Generated from analysis of 47 SugarCraft packages against 50+ third-party repositories
SugarCraft is a 47-package PHP monorepo porting the Charmbracelet TUI ecosystem (bubbletea, lipgloss, glow, gum, huh, bubbles) and related tools to PHP 8.3+. Packages span foundational layers (candy-core TEA runtime, candy-sprinkles styling, candy-shine markdown) through UI components (sugar-bits, sugar-prompt, candy-forms), data visualization (sugar-charts, sugar-table), and full applications (candy-serve, candy-tetris, candy-mines).
The ecosystem is functionally mature β many packages already surpass their Go upstreams in specific dimensions β but shares recurring architectural weaknesses that compound across the monorepo.
(Findings mentioned across 3+ packages/stages)
-
No snapshot/golden file testing for ANSI rendering output β The single most-cited gap. candy-forms, sugar-prompt, sugar-bits, sugar-charts, sugar-table, sugar-glow, candy-vt, candy-vcr, sugar-spark, sugar-calendar all explicitly cite zero ANSI byte-level assertions on
view()output. Upstream repos (bubbletea, huh, ratatui, pterm with 28,952 tests) all use golden files. Without them, any regression in SGR codes, cursor positioning, or layout is invisible until runtime. -
Byte-level string operations break UTF-8/grapheme content β candy-hermit's
highlightMatches()uses byte indexing; candy-freeze's 0.6 font aspect ratio fails on CJK/multi-byte content; sugar-spark's parser has C1 limitations due to PHP's native UTF-8 handling. The ecosystem re-implements byte-loop parsing instead of using a shared state machine. -
No Cassowary constraint solver β candy-sprinkles, candy-core, candy-forms, sugar-bits, sugar-boxer, sugar-dash, sugar-stash, sugar-stickers all need constraint-based layout (column A = 30% but never less than 10). Currently each package implements greedy one-pass sizing manually.
-
Greedy constraint solvers / no shared layout engine β Every layout-sensitive package independently implements manual sizing logic. No shared layout engine exists at the foundation layer.
-
Terminal capability detection failures cause panics, not graceful fallback β candy-mosaic, sugar-glow, candy-wish (Stage 2) all struggle with probing failures on Windows, SSH, old terminals. ratatui-image issues #69, #68, #72, #64 all stem from probing failures producing unhelpful errors. No package has an
auto()fallback that always returns a usable renderer. -
Manual byte-loop parsing vs. state machine architecture β sugar-spark (551-line Inspector.php), candy-hermit use
strlen()/strpos()at byte level. The canonical state machine fromcharmbracelet/x/ansiis already available in candy-vt but not shared. -
God Classes with 10-15 constructor parameters β super-candy's
Manager(915 lines, 15 params), candy-query'sApp(12 args). Builder pattern never applied proactively. -
String-based action detection for undo/redo β super-candy uses
str_starts_with($desc, 'delete ')to route undo actions; translation changes silently break it.
(Features called "critical" or "high" in 3+ packages across stages)
-
Fuzzy matching with ranked scoring + highlighted match indices β candy-shell, candy-forms, sugar-prompt, sugar-bits all cite the same gap:
FuzzyMatcher::match()returns scored candidates but NOT matched character indices (filter highlighting UI is impossible). The Go upstreamsahilm/fuzzyvia gum filter is cited as reference. PHP has no production-grade fuzzy library. -
True cell-based buffer model β candy-core, sugar-bits, candy-sprinkles all render through string-based diffing. External repos (ultraviolet, ratatui) use
Buffer/Cellgrids where each cell has (rune, style, link, width), enabling per-cell dirty tracking and SGR transition optimization. -
Snapshot tests for ANSI render output β Called out explicitly as "almost entirely absent" across candy-forms, sugar-prompt, sugar-bits, candy-shine, sugar-charts, sugar-table, sugar-glow, candy-vt, candy-vcr.
-
Cassowary constraint solver β Enables responsive layouts that adapt to terminal resize without manual string padding. Declarative constraint specification is impossible today.
-
GitHub/GitLab README fetching in sugar-glow β The defining feature of upstream
charmbracelet/glowis entirely absent. -
Debug visualization mode in candy-zone β Upstream issue #7 (open for years) requesting zone boundary visualization. No equivalent in PHP.
-
Mouse event deduplication helpers in candy-zone β Upstream issue #10: drag operations produce duplicate
MouseDownevents.ZoneClickTrackerclass would be competitive differentiation. -
Persistent storage backend β candy-serve has zero persistence (in-memory only; upstream soft-serve uses SQLite/PostgreSQL). candy-metrics needs HTTP scrape endpoint.
-
TUI implementation missing β candy-serve has zero TUI (the defining upstream feature). SSH-server mode is #1 requested feature in sugar-wishlist.
-
Buffer diffing / dirty-region tracking β sugar-boxer, sugar-dash, sugar-crush, sugar-veil, sugar-stickers, candy-lister all do full re-render every frame. Should emit only delta ANSI sequences via ECH/REP/ICH/DCH.
-
Input driver / TTY integration β sugar-readline cannot read actual terminal keypresses β only processes pre-decoded symbolic key names. No mechanism to decode terminal escape sequences (Kitty keyboard protocol, SGR mouse). Blocking real-world interactive usage.
-
Testing infrastructure β Every package in Stage 5 independently identifies the same hole: no
Simulatorclass, noProgram::withInput()/withOutput(), no snapshot testing utilities. bubble-tea issue #1654 (6+ years old) confirms Go never solved this. SugarCraft can lead here. -
Concurrent write safety β sugar-tick's JSONL append is unsafe across multiple editors; one Ctrl+C away from corrupt data. candy-flip's DISPOSAL_PREVIOUS mode races the same way.
-
Progress feedback for async operations β super-candy's AsyncOps fires copy/move without any progress callback; users see nothing until completion. yazi and ranger set the modern standard with per-file, per-byte progress bars.
-
Cascading style inheritance + BlockStack β glamour maintains a
BlockStackthat computes available width dynamically as blocks nest. candy-shine cannot propagate accumulated indent to deeply nested structures. Deeply nested blocks (blockquote > list > blockquote > paragraph) are not architecturally supported.
-
Shared
Buffer/Cellvalue object hierarchy β No package has a shared cell buffer. This means: cell-level diffing cannot be shared, canvas layering is per-package, and a future cell-based renderer would need per-package implementation. -
StatefulWidget / Event-Driven separation β sugar-dash, sugar-crush, sugar-readline, candy-lister mix state and rendering. ratatui/textual separate
Widget(render-only) fromStatefulWidget+ separate state objects (TableState,ListState). Enables testability and multiple views of same data. -
Consistent mouse hit-testing infrastructure β Mouse support relies on external candy-zone Manager wiring rather than bubblezone's self-contained Mark/Scan/Get pattern. No consistent coordinate translation or zone tracking.
-
Async concurrency model consistency β candy-forms/sugar-prompt have ReactPHP async suggestions but no cancellation. candy-pty has no async concurrency model. candy-shell's
subscriptions()returns null. The Elm Architecture'sCmdpattern is fragmented. -
Shared ANSI state machine β
charmbracelet/x/ansiParser is already in candy-vt but not shared. sugar-spark, candy-hermit, candy-freeze re-implement byte-level parsing instead.
-
Buffer diffing for SSH bandwidth β Full re-render every frame wastes bandwidth on SSH. Delta ANSI sequences (ECH/REP/ICH/DCH) critical for live dashboards.
-
Wide-character overflow handling β sugar-boxer (and likely others) don't fill adjacent cells when writing CJK/emoji, causing visual artifacts.
-
Parallel base64 encoding β candy-mosaic cites
blacktop/go-termimgsync.Pool pattern for ~33% speedup in terminal image rendering. -
LRU cache sizing β go-termimg has 100-entry LRU vs the current smaller cache; request coalescing in async pipeline.
-
ContentGenerator pattern β sugar-stickers needs
Node::withContentGenerator(Closure(int $maxX, int $maxY): string)for per-cell adaptive text truncation without pre-measuring. -
Adaptive framerate via
$lastFrameDurationβ candy-core exposure of frame timing would enable animation efficiency gains.
-
16-parameter constructor for ProgramOptions β
ProgramOptions::builder()pattern needed immediately (candy-core). -
spl_autoload_functions()beforeget_declared_classes()β CommandScanner autoloading fix needed in candy-shell. -
No shared testing infrastructure β Each package reinvents test utilities rather than building on a shared base.
-
Inconsistent
auto()fallback pattern β Terminal capability probing failures produce panics rather than graceful degradation. -
Builder pattern never applied proactively β god classes (super-candy Manager at 915 lines, candy-query App at 12 args) grow without limits.
-
No golden file snapshot documentation β The testing pattern that would unlock confident refactoring is undocumented across the ecosystem.
-
Cassowary constraint solver documentation β The algorithm and its application to terminal layouts is not documented in SugarCraft.
-
Input driver documentation β sugar-readline blocking issue has no documented path to resolution.
-
Bubble Tea subscription model β candy-shell
subscriptions()returning null suggests incomplete documentation of concurrent command patterns. -
Cell-based renderer documentation β The architecture that would enable per-cell dirty tracking has no architectural doc.
-
No debug visualization for zone boundaries β candy-zone developers cannot validate placement without visible boundaries.
-
No mouse event deduplication β Duplicate MouseDown events on drag operations across zone boundaries.
-
No progress feedback for async file operations β super-candy, sugar-post silent failures until completion.
-
No Vim mode parity β Implemented in candy-forms, sugar-prompt, sugar-bits but not universally across text input components.
-
No smooth scroll parity β Viewport lerp animation exists in candy-forms/sugar-prompt but not consistently applied.
-
No type-ahead filtering β sugar-crumbs has it but most interactive selects do not.
-
Zero ANSI byte assertions β The most-cited ecosystem-wide gap. Every rendering package vulnerable to silent regressions.
-
No
Simulatorclass β bubble-tea issue #1654 (6+ years, never solved in Go). SugarCraft can pioneer this. -
No
Program::withInput()/withOutput()β Standard testing harness for TEA programs absent. -
Concurrent write corruption β
flock()absent from JSONL append operations (sugar-tick, candy-flip). -
O(1) win detection only in candy-mines β Other packages have algorithmic inefficiencies that snapshot tests would catch.
-
GitHub/GitLab README fetching β sugar-glow HTTP integration with GitHub REST API v3 / GitLab API v4.
-
SSH server mode β candy-serve SSH mode and sugar-wishlist's #1 requested feature.
-
PNG CLI output β candy-freeze
PngRendererexists (373 lines) but CLI only exposes SVG. -
MarkLine wiring into LineChart/BarChart β sugar-charts
MarkLineclass exists but not integrated. -
Mosaic::auto()graceful fallback β Try probing, fall back to HalfBlock on any exception. -
Mosaic::diagnose()β Structured terminal capability report. -
DatabaseInterface extraction β Unblocks MySQL/Postgres in candy-query.
-
yazi/ranger-style progress bars β Per-file, per-byte progress for super-candy file operations.
Ranked by citation frequency + relevance across all stages
| Rank | Repository | Citations | Role |
|---|---|---|---|
| 1 | charmbracelet/bubbletea |
40+ | Canonical TEA runtime upstream; every package either ports from it or references its patterns (Model/Update/View/Msg, Cmd/Batch, subscriptions, synchronized output, mouse/focus/paste handling) |
| 2 | charmbracelet/lipgloss |
25+ | Primary styling upstream for candy-sprinkles; CSS shorthand, adaptive color, CIELAB blending, borders, layer compositing, Canvas cell buffer |
| 3 | ratatui/ratatui |
20+ | TUI benchmark; Cassowary constraint solver, buffer diffing, StatefulWidget pattern, immediate-mode rendering, Text/Line/Span hierarchy |
| 4 | charmbracelet/gum |
8+ | Primary CLI tool upstream for candy-shell; fuzzy filter, 2D grid choose, external editor integration, per-element style flags |
| 5 | charmbracelet/huh |
7+ | Upstream for sugar-prompt/candy-forms Form/Field architecture; Eval/Cache dynamic binding, per-field keymap override, error summary |
| 6 | charmbracelet/bubbles |
7+ | Upstream for sugar-bits/candy-forms primitives; TextInput, TextArea, ItemList, FilePicker, Cursor, Spinner; LineInfo soft-wrap tracking |
| 7 | textualize/textual |
9+ | Python state-of-the-art TUI (30k stars); reactive state descriptors, CSS layout, spatial map for O(log n) mouse hit, message bubbling, Pilot testing pattern |
| 8 | ratatui/ratatui-image |
6+ | Sliced/partial rendering and never-fail image initialization; reference for graceful fallback architecture |
| 9 | blacktop/go-termimg |
5+ | Terminal image rendering; parallel base64 encoding, larger LRU cache, request coalescing, Unicode placeholder mode |
| 10 | charmbracelet/x/ansi |
5+ | ECMA-48 state machine parser; ANSI width calculation, C0/C1 control codes. Foundational for entire ANSI-inspection stack |
| 11 | php-tui/php-tui |
5+ | PHP TUI port; same architectural targets as ratatui but PHP-native |
| 12 | charmbracelet/glow |
4+ | Primary upstream for sugar-glow; defines markdown/TUI rendering architecture |
| 13 | sahilm/fuzzy |
4+ | Go fuzzy library (via gum filter); referenced by candy-shell, candy-forms, sugar-prompt, sugar-bits for ranked fuzzy matching |
| 14 | ultraviolet-org/ultraviolet |
3+ | ANSI manipulation library; SGR diffing, cell-level rendering, syntax highlighting. Reference for cell-buffer implementation |
| 15 | charmbracelet/vhs |
3+ | Demo/tape recording; CI workflow references for visual regression testing |
-
charmbracelet/bubbleteaissue #1654 β "testing framework" β 6+ years open, the canonical reference for why SugarCraft should pioneer its ownSimulatorclass. -
charmbracelet/bubbleteaPR signal leak fixes β Signal handling patterns for proper process termination (cited in Stage 5). -
ratatui/ratatui-imageissues #69, #68, #72, #64 β Terminal probing failure patterns leading to theauto()fallback architecture recommendation. -
charmbracelet/bubbleteamouse race condition issues β Referenced by multiple packages for mouse event deduplication approaches. -
textualize/textualissue #6381 β GC stuttering with weakref DOM; cautionary tale for candy-sprinkles-style object reference management. -
charmbracelet/bubbleteanested model routing bugs β TEA architecture limitations that SugarCraft should design around. -
charmbracelet/gumfuzzy implementation β Thesahilm/fuzzyintegration pattern that SugarCraft needs for ranked fuzzy matching. -
ratatui/ratatuiCassowary constraint solver β The definitive open-source reference implementation for constraint-based layout. -
charmbracelet/x/ansiECMA-48 state machine β The canonical Go state machine for ANSI parsing, already partially ported in candy-vt. -
go-termimgparallel base64 encoding β Practical performance optimization pattern for terminal image rendering.
Top 20 opportunities across ALL packages with Impact/Complexity/Risk/Priority
| # | Opportunity | Primary Packages | Impact | Complexity | Risk | Priority |
|---|---|---|---|---|---|---|
| 1 | Add snapshot/golden file tests for ANSI output | candy-forms, sugar-prompt, sugar-bits, sugar-charts, sugar-table, sugar-glow, candy-vt, candy-vcr | Critical | Low | Low | P0 |
| 2 | Add Simulator + Program::withInput()/withOutput() test harness |
All TEA-based packages | Critical | Medium | Low | P0 |
| 3 | Add flock() to JSONL append operations |
sugar-tick, candy-flip | Critical | Low | Low | P0 |
| 4 | Implement fuzzy matching with scored indices | candy-shell, candy-forms, sugar-prompt, sugar-bits | High | Medium | Low | P0 |
| 5 | Add ProgramOptions::builder() + ergonomic APIs |
candy-core | High | Low | Low | P0 |
| 6 | Extract DatabaseInterface in candy-query |
candy-query | Critical | Low | Low | P0 |
| 7 | Fix toSshArgv() to emit ALL identity files |
sugar-wishlist | High | Low | Low | P0 |
| 8 | Wire Mosaic::auto() + diagnose() |
candy-mosaic | High | Low | Low | P0 |
| 9 | Implement Cassowary constraint solver | candy-sprinkles, candy-core, sugar-bits, sugar-boxer, sugar-dash | Critical | High | Medium | P1 |
| 10 | Implement cell-based buffer model | candy-core, sugar-bits, candy-sprinkles | Critical | High | Medium | P1 |
| 11 | Implement buffer diffing / dirty-region tracking | sugar-boxer, sugar-dash, sugar-crush, sugar-veil, sugar-stickers, candy-lister | High | Medium | Low | P1 |
| 12 | Add input driver for terminal keypress decoding | sugar-readline | Critical | High | Medium | P1 |
| 13 | Add charmbracelet/x/ansi state machine sharing |
sugar-spark, candy-hermit, candy-freeze, candy-vt | High | Medium | Low | P1 |
| 14 | Implement GitHub/GitLab README fetching | sugar-glow | High | Medium | Low | P1 |
| 15 | Add debug visualization mode | candy-zone | High | Low | Low | P1 |
| 16 | Add mouse event deduplication helpers | candy-zone | High | Low | Low | P1 |
| 17 | Add ContentGenerator pattern |
sugar-stickers | Medium | Low | Low | P1 |
| 18 | Fix wide-character overflow handling | sugar-boxer | High | Low | Low | P1 |
| 19 | Wire MarkLine into LineChart/BarChart | sugar-charts | Medium | Low | Low | P2 |
| 20 | Implement SSH server mode | candy-serve, sugar-wishlist | High | High | Medium | P2 |
-
Add snapshot tests to candy-forms + sugar-prompt β Establish the golden file pattern once; apply to all 8 primitives and 7 field types. Highest-confidence, lowest-risk improvement available.
-
Fix fuzzy matching in candy-shell Filter β Wire
SubStyleParserfor per-element styles + fixCommandScannerautoloading. Two low-complexity wiring fixes with high impact. -
Add
ProgramOptions::builder()to candy-core β 16 constructor params is unwieldy; builder pattern is a one-day change with ecosystem-wide benefit. -
Add
flock()to sugar-tick Store::append() β One-line fix eliminates critical concurrent-write corruption risk. -
Extract
DatabaseInterfacein candy-query β Stable 7-method interface; unblocks MySQL/Postgres driver. -
Fix
toSshArgv()in sugar-wishlist β Single-method change + test; full SSH feature parity. -
Wire
Mosaic::auto()+diagnose()in candy-mosaic β Eliminate user-facing failures on Windows, SSH, old terminals. -
Add
CANDY_ZONE_DEBUG=1to candy-zone β Debug visualization mode; competitive differentiation over upstream. -
Wire PNG renderer to candy-freeze CLI β
--format pngflag; closes CLI/API parity gap. -
Add wide-char overflow fix to sugar-boxer β Fill adjacent cells when writing CJK/emoji.
-
Wire MarkLine into sugar-charts LineChart/BarChart β
MarkLineexists, needs only integration wiring.
-
Implement Cassowary constraint solver β Shared layout engine enabling responsive dashboards. 1000+ lines of algorithmic code; should be a shared
SugarCraft\Layoutpackage. -
Implement cell-based buffer model β Shared
Buffer/Cellvalue object hierarchy enabling per-cell diffing, canvas layering, animation efficiency. -
Implement buffer diffing β Delta ANSI sequences (ECH/REP/ICH/DCH) for SSH bandwidth optimization and flicker-free animations.
-
Implement
Simulatorclass + test harness β Pioneer what bubble-tea never solved.Program::withInput()/withOutput()pattern plusSimulatorfor driving TEA updates programmatically. -
Add input driver to sugar-readline β Decode terminal escape sequences (Kitty keyboard protocol, SGR mouse). Unblock real-world interactive usage.
-
Share
charmbracelet/x/ansistate machine β Extract from candy-vt and share with sugar-spark, candy-hermit, candy-freeze. Eliminates duplicate byte-loop parsers. -
Implement SSH server mode in candy-serve β The defining upstream feature that is entirely absent.
-
Add progress feedback to super-candy β Per-file, per-byte progress bars matching yazi/ranger standard.
-
Add concurrent undo/redo infrastructure β
UndoActionTypeenum replacing string-based detection; shared across super-candy, candy-mines, candy-tetris. -
Add
Builderpattern to god classes β Refactor super-candy Manager (915 lines) and candy-query App (12 args) using extracted value objects.
-
Shared
Buffer/Cellrendering foundation β Architectural investment enabling all packages to benefit from cell-level diffing, per-cell styling, and animation efficiency in one change. -
Shared layout engine with Cassowary β
SugarCraft\Layoutpackage used by candy-sprinkles, sugar-bits, sugar-boxer, sugar-dash, candy-forms. -
Shared mouse hit-testing β bubblezone-style Mark/Scan/Get pattern self-contained in each zone-aware package rather than external dependency.
-
Shared ANSI state machine β Centralized
charmbracelet/x/ansiport powering all ANSI inspection and terminal emulation. -
Cascading style inheritance + BlockStack β Glamour parity for candy-shine; enables correct nested markdown rendering.
-
GitHub/GitLab README fetching β Complete
charmbracelet/glowfeature parity for sugar-glow. -
Textual-style reactive state descriptors β Optional enhancement to TEA model pattern enabling auto-watcher injection.
-
Organization-wide snapshot testing infrastructure β Shared golden file utilities,
Simulatorbase class,Program::withInput()/withOutput()harness.
-
SugarCraft/Coreβ Already exists as candy-core; needsProgramOptions::builder(),Program::withLogger(),Program::withExceptionHandler(), exposed$lastFrameDuration. -
SugarCraft/Layoutβ New package implementing Cassowary constraint solver. Consumed by candy-sprinkles, sugar-bits, sugar-boxer, sugar-dash, candy-forms. -
SugarCraft/Bufferβ New package implementingBuffer/Cellgrid model. Consumed by candy-core renderer, candy-sprinkles Canvas, candy-shine Renderer, sugar-bits components, candy-forms primitives. -
SugarCraft/Testingβ New package withSimulatorclass,Program::withInput()/withOutput(), snapshot assertion utilities, golden file management. -
SugarCraft/Ansiβ Sharedcharmbracelet/x/ansistate machine port. Consumed by sugar-spark, candy-hermit, candy-freeze, candy-vt. -
SugarCraft/Mouseβ Shared Mark/Scan/Get pattern for self-contained zone hit-testing. Consumed by candy-zone, sugar-veil, sugar-crumbs, and all zone-aware packages. -
SugarCraft/Inputβ New package with terminal escape sequence decoder (Kitty keyboard protocol, SGR mouse), enabling sugar-readline real-world usage.
-
Buffer/Cellβ Value objects for terminal grid rendering with (rune, style, link, width) per cell. -
LayoutSolverinterface β Constraint-based layout contract with Cassowary implementation. -
FuzzyMatcherinterface β Scored fuzzy matching with matched character indices (enables UI highlighting). -
ProgramSimulatorβ Test harness for driving TEA updates with scripted input. -
ZoneClickTrackerβ Mouse event deduplication for zone+button press/release pairs. -
TerminalProbe/Mosaic::auto()β Graceful capability detection with safe universal fallback. -
DatabaseInterfaceβ Extracted contract in candy-query enabling multiple drivers. -
UndoActionTypeenum β Type-safe undo action routing replacing string-based detection. -
StyleSheet/BlockStackβ Cascading style inheritance for nested block rendering. -
ProgressReporterinterface β Standard contract for per-file, per-byte progress callbacks.
-
Merge candy-forms and sugar-prompt testing utilities β Both have identical needs for ANSI byte assertions; share golden file utilities.
-
Extract shared state machine from candy-vt β
charmbracelet/x/ansiparser should be a standalone package consumed by all ANSI-inspection packages. -
Consolidate layout solvers β 5+ packages each have greedy layout code; a shared
SugarCraft\Layoutwould eliminate duplication and enable constraint-based sizing. -
Unify mouse hit-testing β bubblezone-style Mark/Scan/Get should be shared infrastructure, not per-package with external wiring to candy-zone.
-
Consolidate buffer rendering β 5+ packages have string-composition rendering; shared
Buffer/Cellmodel enables centralized improvements. -
Consolidate async patterns β ReactPHP integration is fragmented; a shared async utilities package would unify cancellation and subscription patterns.
-
Consolidate styling foundations β candy-shine, candy-sprinkles, and ad-hoc styling across packages should share a common style inheritance system.
-
Fuzzy matching β candy-shell (SubStyleParser), candy-forms (FuzzyMatcher), sugar-prompt (FuzzyMatcher), sugar-bits (ItemList str_contains) β each re-implementing with different quality levels.
-
Byte-loop ANSI parsing β sugar-spark (551-line Inspector.php), candy-hermit (strlen/strpos), candy-freeze (manual byte operations) β instead of sharing state machine.
-
String-based layout β Every layout-sensitive package manually pads strings; none use constraint specification.
-
Manual mouse coordinate tracking β sugar-veil, sugar-crumbs, candy-lister each wire candy-zone Manager independently rather than using self-contained Mark/Scan/Get.
-
ReactPHP async β candy-forms/sugar-prompt have async suggestions; candy-core has exec() that blocks; inconsistent async models across ecosystem.
-
Golden file assertions β Zero packages have them; this is a repeated gap across 15+ packages rather than repeated reinvention, but the failure to adopt them across the ecosystem is itself a pattern.
-
Vim mode β Implemented in candy-forms, sugar-prompt, sugar-bits, sugar-readline β four independent implementations of the same feature.
-
Snapshot test pattern β Every package independently "should add" them; no shared infrastructure emerged despite universal acknowledgment of need.
-
Terminal capability probing β candy-mosaic, sugar-glow, candy-wish each struggle with the same probing failure patterns independently.
-
God class construction β super-candy Manager (915 lines), candy-query App (12 args) represent the same architectural failure in different stages.
Cross-referenced from all stages
-
candy-sprinkles > lipgloss β Greedy constraint solver (handles 80% of cases vs lipgloss none),
Solver::SpaceBetween/SpaceAround, 10 named themes vs fewer presets. -
candy-forms / sugar-prompt > huh β ReactPHP async suggestions (not in Go upstream at all), Vim mode, smooth scroll with lerp, 7 built-in themes vs 5.
-
sugar-bits > bubbles β Per-cell
styleFuncfor Table, Vim mode, ValidateOn timing control, zone-based mouse for Tabs, spring physics via honey-bounce integration. -
honey-bounce > harmonica β REDUCE_MOTION accessibility, immutable
Projectile::update(), UIKit spring presets, Easing/CubicBezier library (15 + 24 CSS), SpringChain/SpringCollection. -
candy-palette > colorprofile β 12-step detection hierarchy with infocmp Phase 2, full NO_COLOR/CLICOLOR/CLICOLOR_FORCE/COLORTERM/terminfo compliance, good test coverage.
-
sugar-calendar > EthanEFung/bubble-datepicker β Immutable + fluent, date range selection, 16-locale i18n, pure ANSI renderer, event store architecture.
-
sugar-toast > daltonsw/bubbleup β Queue-based multi-alert (upstream single-alert), 9 positions (upstream 6), progress bar, action buttons, history log, UTF-8 multibyte fixes.
-
sugar-skate > charmbracelet/skate β Import/export system (Go has none), 17-locale i18n (Go has none), schema migration, glob-to-SQL, multi-database via suffix syntax.
-
candy-freeze > charmbracelet/freeze β 5 window decoration styles (macOS-only upstream), TTF font embedding, line highlighting, language detection, pure PHP SVG (no WASM/FFI), immutable builders.
-
sugar-boxer > treilik/bubbleboxer β Immutable Node pattern, 9 border styles via candy-sprinkles, pure string renderer decoupled from tea runtime.
-
sugar-veil > rmhubbert/bubbletea-overlay β 9-position anchor (vs upstream 5), multi-overlay z-index stacking, animation infrastructure, backdrop dimming, auto-size, click-outside dismissal, UTF-8 column tracking.
-
sugar-crumbs > KevM/bubbleo β Type-ahead filtering, path parsing via
Shell::pushDirectory(), HTML with ARIA semantics, 678-line test suite, i18n. -
sugar-readline > erikgeiser/promptkit β True immutability via clone-on-mutation, pure PHP zero deps, Vi/Emacs abstraction, parallel undo/redo, decoupled confirmation, FIFO rollover, 708-line test suite.
-
candy-lister > treilik/bubblelister β Smith-Waterman fuzzy matching with O(c) memory, immutable filter state machine, 16-language i18n (upstream 3).
-
candy-tetris >> tetrigo β Already surpassed with T-Spin/B2B/Combo/PerfectClear scoring, DAS/ARR input, VS Computer mode, 82+ tests. Position as reference implementation, not a port.
-
candy-mines >> go-sweep β O(1) win detection (vs O(n) grid scan), first-click safety, deterministic injectable RNG, iterative flood-fill. go-sweep is dormant; candy-mines has clear headroom.
-
candy-kit β Only framework-agnostic PHP CLI presenter library. No comparable pure-presentation PHP library exists. Occupies an empty, uncontested niche.
Bubble Tea issue #1654 has been open for 6+ years. SugarCraft is positioned to pioneer a Simulator class and Program::withInput()/withOutput() testing harness that the Go ecosystem still lacks. This is a meaningful differentiation opportunity: publish the pattern, blog about it, own the narrative of "PHP leads in TUI testing."
The ecosystem has 5+ packages each doing their own layout, buffer rendering, fuzzy matching, and ANSI parsing. The ROI on a shared SugarCraft/Buffer, SugarCraft/Layout, SugarCraft/Ansi, and SugarCraft/Testing is enormous β one algorithmic fix benefits the entire ecosystem simultaneously.
candy-tetris, candy-mines, candy-kit, honey-bounce, candy-palette, and sugar-bits all have genuine competitive advantages over their upstreams. These should be highlighted prominently β they represent proof that SugarCraft is not merely a porting effort but an active improvement on the originals.
sugar-readline's inability to decode actual terminal keypresses is a critical blocker. Any production CLI tool using SugarCraft for interactive input is currently demo-only. This single fix unblocks real-world adoption of the entire interactive layer.
The number of packages (6) citing full re-render as a problem, combined with the concrete escape sequence references (ECH/REP/ICH/DCH), makes this a well-defined, high-impact project. A shared Buffer::diff() method benefits every rendering package at once.
Data corruption bugs (sugar-tick JSONL, candy-flip canvas) are the kind that creates user distrust. Adding flock() is trivial; the damage from silent corruption is not. Treat this as a security-class issue.
The constraint solver is the one genuinely hard algorithmic problem in the ecosystem. It should live in one place (SugarCraft/Layout) and be consumed by all layout-sensitive packages, rather than being independently ported 5 times at varying quality levels.
Generated from cross-stage analysis of 47 SugarCraft packages across 5 stages of review against 50+ third-party repositories.