Skip to content

UI 2.0 visual refresh (strictly UI, off main)#863

Open
backnotprop wants to merge 7 commits into
mainfrom
ui-2.0-extraction
Open

UI 2.0 visual refresh (strictly UI, off main)#863
backnotprop wants to merge 7 commits into
mainfrom
ui-2.0-extraction

Conversation

@backnotprop
Copy link
Copy Markdown
Owner

Replicates the UI/styling layer from the single-server-runtime branch onto main's standalone architecture — components and styling only, none of the daemon/SPA/session migration.

What's in

  • Base components — shadcn ui/* primitives (button, card, dialog, dropdown-menu, tabs, badge, state-pill, textarea) + cn() helper + deps
  • Themes — new Simple / Neutral themes + design-system token bridge (surface-* / sidebar-* / card-shadow) folded into theme.css
  • Native scroll — removed overlayscrollbars; OverlayScrollArea renders the host element as the native scroll node (getViewport handle)
  • Grid plan view — opt-in gridEnabled (grid paper) vs the simplified flat card
  • Agents/jobs panel + AnnotationPanel redesign — fed by main's existing SSE useAgentJobs (no transport change)
  • Full-width HTML viewer + in-iframe click-to-annotate
  • First-use "new look & feel" dialog with an inline grid opt-in (follows the existing PlanAIAnnouncementDialog pattern; gated to normal authoring context)

Explicitly excluded (kept on main)

  • Archive + the notes (Obsidian/Bear/Octarine) integrations
  • All single-server-runtime architectureuseSessionFetch/daemonHub/sessionTree/api.ts session base-url, the Zustand session/config rewrite, the SPA shell, __embedded/session-revision/multi-session wiring, SSE→WS transport. Main keeps its singleton configStore and standalone per-process servers.

Verification

  • bun run --cwd packages/ui typecheck ✅ · build:hook (plan editor) ✅ · build:review (code review) ✅
  • Leakage guard: zero new useSessionFetch/zustand/daemonHub/getState().set
  • Regression guard: overlayscrollbars removal is the only lib change; archive intact
  • Reviewed by a 4-model adversarial pass (2 Opus, 2 Sonnet) + self-review (fixed dialog context-guards + a redundant button)

Known follow-ups (not blocking)

  • useHtmlAnnotation.ts — replace an as unknown as cast with a proper BridgeSelectionRectMessage type variant
  • Full-width HTML doesn't auto-close the left sidebar yet (deliberately deferred as out-of-scope)

Replicates the UI/styling layer from the single-server-runtime branch onto
main's standalone architecture — components and styling only, none of the
daemon/SPA/session migration.

- Base components: shadcn ui/* primitives (button, card, dialog, dropdown-menu,
  tabs, badge, state-pill, textarea) + cn() helper + deps
- Themes: new Simple/Neutral themes + design-system token bridge
  (surface-*/sidebar-*/card-shadow) folded into theme.css
- Native scroll: remove overlayscrollbars; OverlayScrollArea renders the host
  element as the native scroll node (getViewport handle)
- Grid plan view: opt-in gridEnabled (grid paper) vs simplified flat card
- Agents/jobs panel + AnnotationPanel redesign (fed by main's existing SSE)
- Full-width HTML viewer + in-iframe click-to-annotate
- First-use "new look & feel" dialog with an inline grid opt-in

Excludes (kept on main): archive, notes integrations, and all single-server-
runtime architecture (useSessionFetch/daemonHub/zustand session store/SPA
shell). Builds green: ui typecheck + build:hook + build:review.
Resolved conflicts (kept both sides):
- Viewer.tsx: my gridEnabled sticky-actions className + main's new message-picker button
- bun.lock: regenerated via bun install against merged package.json
Auto-merged App.tsx / Settings.tsx / settings.ts. Verified: ui typecheck +
build:hook + build:review all green; overlayscrollbars stays removed.
HTML annotation reverts to main's text-select behavior — no pinpoint /
data-annotate / element-SVG clicking (that was an experiment). The full-width
(fullViewport) render is kept. bridge-script.ts and useHtmlAnnotation.ts are
now byte-identical to main.

Also restores two touches under-ported from the source branch:
- key the HtmlViewer per document so it re-initialises on doc switch
- gate StickyHeaderLane off the HTML surface (!isHtmlSurface)

Verified: ui typecheck + build:hook + build:review green; zero SVG/pinpoint/
inputMethod residue in the HTML path.
…e scale, CR icon)

- theme.css: --warning token + UI 2.0 type scale (@theme; fonts excluded so
  main's 51 per-theme fonts are untouched)
- ResizeHandle: hover-reveal collapse button (onCollapse)
- useResizablePanel: drag-to-snap-shut (onSnapClose) + pointer-events/rAF smoothness
- SidebarContainer: 40px header + solid panels (archive feature kept — surgical)
- TableOfContents: flat indented list (was chevron tree)
- EditorAnnotationCard: variant restyle (+ ReviewSidebar code-review variant)
- code review: lucide FolderTree file-tree icon
- editor + review-editor App: wire onCollapse / onSnapClose into the resize handles

Builds green (ui typecheck + build:hook + build:review). archive intact,
fonts untouched, no single-server-runtime leak.
…e stat zero-hiding

- ResizeHandle: reveal collapse button on full-sidebar hover; larger hit target;
  per-call-site z-index so plan handles clear the z-50 doc card (code review keeps z-10)
- Plan editor: wrap right AI/annotations panel in group/sidebar; restyle AI panel
  header to match AnnotationPanel (h-10, normal title, no stray caret)
- SidebarContainer + ReviewSidebar: drop redundant header close carets (handle collapses)
- Code review nav header: restore feat order (toggles -> divider -> menu far-right)
- FileTreeNode: hide the zero side of +adds/-dels per row, matching feat
- bun.lock: lucide-react (FolderTree icon)
In the 'simple' (neutral) theme, --accent is a low-contrast gray/near-white,
so any control using raw text-accent goes illegible. Route the affected ones
through the existing escape-hatch token --annotation-comment (defined as
var(--accent) in every theme EXCEPT simple, which overrides it to a legible
blue) so all other themes render pixel-identically.

- ToolbarButtons: adopt the shared Button component (outline/success/secondary
  variants) — matches feat; fixes Send Annotations legibility
- AnnotationToolbar comment button + AnnotationToolstrip comment mode hover:
  text-accent -> text-annotation-comment
- PRSelector + StackedPRLabel (PR label): text-accent/bg-accent ->
  annotation-comment (the simple-theme PR-label contrast bug)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant