Full UI port: Bubble Tea/lipgloss to Limoni (core + extra) #33
Labels
No labels
harness
proj-core-console
proj-core-demo
proj-core-edit
proj-core-init
proj-core-lib
proj-core-login
proj-core-res
proj-core-sh
proj-core-theme
proj-docs
proj-extra-calc
proj-extra-code
proj-extra-playbook
proj-extra-sheets
proj-harness
proj-os
residual
tier-0-trivial
tier-1-easy
tier-2-medium
tier-3-hard
tier-4-major
tier-5-epic
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
residual/.agent#33
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Port every remaining Bubble Tea / lipgloss UI surface in
core/andextra/to Limoni, on the unifiedlimoni-portbranch (same name in both repos). Follows the res-edit (#30) and res-code (#32) PoCs, whose branches are merged intolimoni-portas the starting point.Workspace
Dedicated workspace at
~/workspace/limoni-port/:.agentas root,core/andextra/cloned inside.Scope
Core shared libs (first):
lib/tui/theme,lib/tui/list,lib/tui/overlaylib/cmd/ui(confirm, input, menu, palette, status)Core tools:
cmd/res-demo,cmd/res-themecmd/residual-login+internal/libs/auth(login, selector)internal/libs/consolemenus/statusbar (lipgloss)internal/libs/shell/remnant/prompt.go(lipgloss)Extra (after core libs):
cmd/res-calc,cmd/res-sheets+lib/sheets/tuiOrder
Core libs → core tools → extra tools. Extra may depend on the new core lib APIs.
Constraints
go build/go vet/go testgreen per repo; static binaries; uitest verification.Step 2 done — core tool UIs ported (commit f1ddb46, pushed to limoni-port)
Ported to Limoni with no behavioral changes beyond the renderer swap:
theme.Render/theme.Width/theme.StripANSI, which were added to the lib.limoni.Wakeup()(res-code PTY pattern); spinner viaWithFPS(10).Branding()now returns styled lines instead of an ANSI string.theme.Render/theme.Widthreplace lipgloss; removedlist.RenderListRow/overlay.RenderHelpOverlaystring APIs reimplemented locally with identical layout.cell.Style+theme.Render.Verification:
CGO_ENABLED=0 go build/vet/testgreen (24 pkgs ok; only pre-existinglib/logfailures); default CGO build fails only on missing PAM headers (verified pre-existing on base). Static ELF for res-demo (~6MB). uitest: res-demo tabs/help/quit, res-theme navigate/edit/quit; login state-machine unit tests; theme render tests. Headless dumps checked for demo + theme layouts.Known Limoni gap:
Runhas no input/output redirection, sologin_ui.godups the configured TTY onto stdio around the run (preserves oldtea.WithInput/WithOutputbehavior).Next: step 3 — extra (res-calc, res-sheets).
Progress: core libs + core tools ported
Step 1 — shared libs (commits
bfab57e,a8cbff5):lib/tui/theme,lib/tui/list,lib/tui/overlay,lib/cmd/ui→ Limoni. uitest coverage added.Step 2 — core tools (per Zach's sequencing, res-demo first):
93344c1Port res-demo to Limoni (own commit, uitest-verified). The demo surfaced a real lib gap → addedlib/tui/theme/render.go(Render/Width/StripANSIstring-rendering helpers).3b1fa0bPort res-theme to Limoni87c9f71Port residual-login and auth UI libs to Limonieae365aPort res-console menus and statusbar to Limoni54fef37Port shell remnant prompt to LimoniVerification:
go build/go vet/go testgreen across core except pre-existing environmental issues (PAM headers absent forresidual-login/internal/libs/auth;lib/logtest failures on clean base). Static ELF check passed for res-demo. The auth port could not be compile-verified here — needs a build with libpam-dev.Note: the branch was force-pushed once during the res-demo split (
93344c1replaced a bundled commit). Anyone who pulledlimoni-portbefore 2026-10-14 13:16 PDT shouldgit fetch origin && git reset --hard origin/limoni-port.Next: extra tools (res-calc, res-sheets).
Demo+lib expansion (Zach's directive)
Inventory: cataloged every UI element across core/extra. Found 9 copies of drawLabel/drawText, 3 copies of the command Palette, 2 MenuBars, plus unused lib widgets (InputPrompt, ConfirmDialog, MenuBar, StatusMessage had zero users).
Extracted to core lib:
lib/tui/drawpackage:Label(clipped styled text),Span/Spans/SpansWidth,Truncate(ellipsis),LabelW(fixed-width),Box(bordered box). Replaced all copies in both repos.lib/cmd/ui.Palette: addedPaletteStyles+SetStylesfor tools with their own chrome (dual unified/neutral theming).Reconciled:
ui.Palette(deleted 300-line copy; pixel-identical via injected chrome styles; dropdown restores original bubbletea dim-desc rendering).ui.Palette(deleted 300-line copy; same).res-demo: new interactive Widgets tab (tab 9) — live playground for Palette, InputPrompt, MenuBar, ConfirmDialog, StatusMessage, tui.List, help overlay, and draw primitives. uitest-covered.
Verification:
go build/go vet/go testgreen in both repos (excluding pre-existing PAM/lib-log env issues).MenuBar unification done (
b5bcabfcore /0aa0b11extra): lib MenuBar gainedMenuBarStyles+SetStyles(mirrors Palette), res-code's bespoke menubar.go deleted in favor of the shared widget — verified pixel-identical headlessly in both chrome modes. Widget sweep complete: draw helpers, Palette, MenuBar all unified incore/lib.