Repository navigation
Conversation
Add src/tokens.css with every spec v2 Section 4 to 6 token for light, dark (system and data-theme), and Increase Contrast, with the WebKit system color keywords declared after the measured fallbacks. Tailwind v3 runs with presets: [] and a theme built only from those tokens, so stock classes such as bg-blue-500, p-7, and rounded-xl emit no CSS. Drop IBM Plex for the system sans and mono stacks, and remap the existing component styles onto the tokens. Vendor dialog, dropdown-menu, context-menu, select, tooltip, command, tabs, popover, toggle, and scroll-area as React 18 forwardRef wrappers over Radix and cmdk, restyled to the spec, each with a behavior test. Guard tests fail on a hex color, px literal, or arbitrary Tailwind value in a component file, on any token pair under WCAG AA, and on stock Tailwind classes producing CSS.
Replace the top bar, scope chip, and bottom status bar with the spec v2 window (Sections 7, 8, 9.1, 9.9): - A source-list sidebar: All Sessions, Repositories, Folders, and Agents, with counts, Mail selection colors for focused and unfocused, arrow-key selection, collapsible sections, a folder context menu, and New Folder. Agent rows run the filter-only agent: search. Hidden below 1000px; toggled with Control-Command-S or the toolbar button. - A 52px toolbar split at the column edges: the scope title and session count over the list (a scope menu when the sidebar is hidden), an empty slot for reader actions, the palette button, Rescan, and the 260px capsule search field. Empty areas are Tauri drag regions. - Rescan shows a spinner, then a progress ring, a failure popover with Try Again, and the last scan time stored as ui.lastScanAt. Command-R rescans. - The filter reference opens from the magnifier, ?, or Command-/, never on focus. Filter-only queries now search. - Notices move from the status bar to a line under the toolbar.
With presets: [] a class outside the tokens compiles to nothing, so a typo or a stock value fails silently. The new test compiles every utility-looking class token in component strings and lists the ones that emit no CSS. It would have caught left-1.5 in the menu indicator before inset had a spacing scale.
The running Rescan button is aria-disabled, which grayed its spinner to the disabled label color (about 1.6:1 on the toolbar). The spinner now keeps the secondary label color. The scan warning moves before Rescan so the controls after it never shift when it appears (spec 17.23). Add the spec's --red-text and --orange-icon tokens for destructive labels and the toolbar warning icon, use them for the existing red text, and check both in the contrast test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The owner's verdict on the PR 20 UI was that it "looks way too vibe coded", and the follow-up ruling set the direction: Lore should look like a first-party Mac app anchored on Apple Mail, built on shadcn/ui restyled to a spec, with no bottom status bar. This is PR 1 of that redesign (docs/design/lore-design-spec.md v2, local). It lays the foundation every later PR builds on: one token system, system fonts, restyled primitives, and the Mail window shell. Session rows, the reader, settings, the palette, and onboarding only pick up the new tokens here; later PRs redesign them.
What changed
Tokens and theme
src/tokens.cssdefines every spec Section 4 to 6 token for light, dark (system appearance and thedata-themeoverride), and Increase Contrast. Measured macOS values come first; WKWebView then swaps in the-apple-system-*keywords under@supports. Includes the new--red-textand--orange-icontokens.tauri.conf.jsontargets macOS 10.15).tailwind.config.tsusespresets: []and a theme built only from the tokens, sobg-blue-500,p-7, orrounded-xlemit no CSS. Preflight stays on.@fontsource/*). Sans and mono are the system stacks; nothing is bundled.src/styles.cssare remapped onto the new tokens. Agent dot colors are gone (spec 17.1).Primitives (
src/components/ui/)forwardRefwrapper over Radix, restyled to spec 9.3, 9.7, 9.10, 9.12. Each has a behavior test (open, keyboard, close, focus return; a ref-forwarding test for Dialog).src/test-setup.tsshimsResizeObserver, pointer capture, andscrollIntoViewfor jsdom.Window shell
data-tauri-drag-region. No traffic lights are drawn.setSetting("ui.lastScanAt", ...); the subtitle reads "Scanning…" during a scan; a polite live region announces each phase; ⌘R rescans.user-select: noneon chrome, text on the reader (18.2).Guards as tests
src/design-guards.test.tsfails on a hex color, or a px literal or arbitrary Tailwind value in a string, in any file undersrc/componentsorsrc/App.tsx. No file undersrc/components/uineeds an exception.src/tokens.test.tscomputes WCAG ratios for every text and background pair in light, dark, and Increase Contrast (4.5:1 text, 3:1 focus ring, segment ring, toolbar icons), and checks thedata-theme="dark"block equals the system dark block.src/theme.test.tsproves stock Tailwind classes compile to nothing and token classes compile to the tokens.src/dead-classes.test.tsfails when a utility class in a component compiles to no CSS.Scope
In: tokens, Tailwind theme, system type, shadcn primitives, the sidebar, the toolbar, Rescan and scan state, removal of the status bar, the guard tests. Out (later PRs): session row anatomy and search tokens (PR 2), the reader and its toolbar actions (PR 3), settings, palette, sheets, onboarding (PR 4). No changes to
src/ipc.ts,src/main.tsx,src/mock/,crates/, orsrc-tauri/.Tradeoffs
Deviations from the spec or the prototype, with reasons:
agent:searches. The brief allowed an Agents section; its rows set the query toagent:<id>and show selected while that is the whole query.?in an empty field, or ⌘/, never on focus (17.13). PR 2 owns the token redesign.src/components/ui/metrics.ts.clsxonly. Noclass-variance-authorityortailwind-merge: the spike measuredcnat 11 kB gzip, and the token vocabulary needs no conflict merging.Cost: JS grows from about 67 kB to 114 kB gzip, mostly Radix, in line with the spike's measurement.
Blast Radius
UI only. Every screen changes appearance because the fonts and colors change. Behavior changes: the scope chip and its popover are replaced by the sidebar and the scope menu; the status bar is removed; filter-only queries now search; the filter reference no longer opens on focus; ⌘R, ⌃⌘S, ⌥⌘F, and ⌘/ are new shortcuts. The only new persisted value is the
ui.lastScanAtsetting. The reader, list rows, settings, palette, and onboarding keep their behavior.Verification
npm run lint: exit 0.npm run typecheck: exit 0.npm test: 12 files, 114 tests passed. Existing App tests were updated for the new shell and new ones cover the sidebar, the scope menu, the narrow-window default, folder rename and delete, New Folder, Settings by mouse, the notices line, Rescan progress, failure and Try Again, the last scan time, ⌘R, filter-only queries, and the filter reference.npm run build: passed. CSS 39.45 kB (8.46 kB gzip), JS 355.17 kB (113.90 kB gzip).--red-textand--orange-icontokens with contrast checks, a fixed position for the scan warning, a rebase ontomain). All are fixed in the last commit, with a test that the running spinner keeps the active color and that the toolbar order holds when the warning appears.docs/design/tools/wkshot.swift) at 1280x800 and 900x700, light and dark, ofmainand this branch. They are gitignored, so they exist only locally:/Volumes/990 Pro/Development/Lore/.claude/worktrees/agent-a465e531a504ecfbd/docs/design/shots/pr1/main//Volumes/990 Pro/Development/Lore/.claude/worktrees/agent-a465e531a504ecfbd/docs/design/shots/pr1/head/(session open, sidebar collapsed at 1280, sidebar shown at 900, scope menu, filter reference, Rescan tooltip, scanning, folder context menu)/Volumes/990 Pro/Development/Lore/.claude/worktrees/agent-a465e531a504ecfbd/docs/design/shots/pr1-review/(the reviewer's shots)npm run tauri dev) and the Rust checks; no file undersrc-tauri/orcrates/changed.