Skip to content

feat(ui): rebuild the archive UI around a query line - #20

Merged
hsusul merged 4 commits into
mainfrom
ui-rebuild
Oct 26, 2026
Merged

hsusul merged 4 commits into
mainfrom
ui-rebuild

Conversation

@hsusul

@hsusul hsusul commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Why

The archive UI restored in #18 is an older three-pane shell. This PR replaces it with a new design built around search. It keeps every capability and uses only what src/ipc.ts exposes.

What changed

  • A query line spans the top bar. Its scope chip picks what to browse: all sessions, one repository, or one folder. The same chip narrows a search to the repository. Filters tint in place as you type, and an empty line shows the filter reference.
  • A virtualized list sits beside a reader. The reader has Conversation, Files, and Git tabs, collapsible tool calls, numbered diffs, and search words highlighted in the transcript. A status bar shows agent counts, messages, and scan progress.
  • Navigation state lives in one reducer in src/hooks/workspace.ts. Data hooks drop responses that lost a race to a newer request. In-app dialogs replace window.confirm and window.prompt.

Scope

  • Covers the whole archive UI: browse, search, the reader, folders, export, forget, settings, backups, onboarding, palette, and rescan.
  • Adds search sort (best match, newest, oldest), which searchPage already supported.
  • Leaves out the Memories section. The top bar and reducer have room for a second section when its backend exists.

Tradeoffs

  • A three-pane mail layout (rail, list, reader) was rejected. At 900px it leaves the reader about 380px wide, which clips patches.
  • A single-column stack (list, then a full-width reader) was rejected. It loses list context while you read.
  • Repositories and folders moved from a permanent rail into the scope picker and the palette. Drag-and-drop filing became a "File in folder" control in the reader.

Blast Radius

Only the webview UI changes: src/App.tsx, src/components, src/hooks, and src/styles.css. The IPC contract, main.tsx, and the Tauri shell are untouched. The bundled IBM Plex fonts are the only new dependencies, and the existing font-src 'self' CSP allows them.

Verification

  • npm run lint, npm run typecheck, npm test (7 files, 64 tests), and npm run build pass. cargo build -p lore-app builds against the new dist/.
  • Behavior tests drive App over a mocked ipc module: filtered and scoped search, empty and failed states, keyboard flow, scan progress, patches, filing, and forgetting. Removing the stale-response guard in useOpenSession makes the out-of-order test fail.
  • Checked in Chrome against a local mock and against the p1-2-archive-mock branch merged locally (never pushed). Screenshots cover light, dark, and 900px. The orchestrator has the local paths.

The rebuilt UI keeps navigation in one reducer: scope, query, sort, the
open session, a single overlay, the status flash, and the scan phase.
Data hooks load the catalog, keyset-paged lists, and the open session,
and each drops responses that lost a race to a newer request.
A query line spans the top bar and drives the app. The scope chip on
its left picks what to browse (all sessions, a repository, a folder) and
narrows a search to a repository. Filters tint in place as you type.
Below it, a virtualized list sits beside a reader with Conversation,
Files, and Git tabs, collapsible tool calls, and numbered diffs. A
status bar carries agent counts, messages, and scan progress.

The palette, settings, onboarding, folder filing, export, and forget
flows keep their capabilities with in-app dialogs instead of
window.confirm and window.prompt. The theme is a cyanotype palette in
light and dark, with IBM Plex Sans and Plex Mono bundled locally.
Replace the old component tests with behavior tests through App over a
mocked ipc module: browsing and paging, scoped and filtered search,
empty and failed states, keyboard flow, scan progress, patches, filing,
and forgetting. Unit tests cover tool-call and diff parsing.
@hsusul
hsusul merged commit cfc9dcf into main Oct 26, 2026
5 checks passed
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