Skip to content

Workspace-scoped app with a workspace picker; filters behind search buttons; File Explorer follows the open file; core-agent deleted - #673

Merged
danbarua merged 4 commits into
mainfrom
workspace-scope
Oct 12, 2026
Merged

danbarua merged 4 commits into
mainfrom
workspace-scope

Conversation

@danbarua

Copy link
Copy Markdown
Owner

Problem

  • packages/core-agent: this old agent runtime is not used. The VS Code extension runs labkit-effect's agent and imported only two logging helpers from it.
  • The landing view: the app started at the API's root list of workspaces (/collections/workspace). A picked workspace was carried in ?list= until a record opened.
  • File Explorer: a file opened from the graph or a link was not shown in File Explorer when its folder was closed.
  • The filter box: the Items pane's filter took a row of its own all the time, and File Explorer and Source Explorer had no filter.

Change

core-agent deleted

  • diagnosticError and redactDiagnostics move into packages/app-vscode/src/utils/redact.ts, with their test. The extension still builds (bun run build in packages/app-vscode).
  • docs/agent/ was core-agent's guidance and is deleted too, except the note on what ACP's messages mean, now docs/acp-language.md.
  • CLAUDE.md, the root package.json (test:agent), the PR labeler, the comment-length check's exemptions and the layering-rule baseline no longer name it.

File Explorer follows the open file. When a file in the tree opens from anywhere else, such as the graph or a link, the folders above it open, so its row and the box show. A folder closed afterwards stays closed until another file below it opens (foldersAbove in explorers.tsx).

Filters behind a search button

  • Items, File Explorer and Source Explorer each have a borderless search button at the right of the list's header. The filter box shows only after the button is pressed.
  • Hiding the box, by the button or by Escape, empties it, so a hidden filter never narrows a list.
  • File Explorer's filter searches every committed path (/paths), so it finds a file in a folder not yet opened, and lists the matches with their folders. At most 200 are drawn, and a line says how many match out of how many files.
  • /paths link template. The listing now links each path's file with an RFC 6570 template, file: { href: ".../file/{+path}", templated: true }, so the page opens a match without building the address itself.
  • Source Explorer's filter narrows the commits loaded so far by id, message, author or branch, without their lanes. It says how many of the loaded commits match, and when more can be loaded.

Workspace-scoped app

  • API. GET /workspace lists the workspaces, each addressed by its own index, with no index above it. /collections/workspace stays for other API clients.
  • Landing view. The app starts at a list of workspaces read from /workspace. A request test checks that the landing view asks for nothing under /collections.
  • Picking a workspace opens /app/workspace/<slug>.
  • Record Explorer.
    • In a workspace it lists the workspace's collections, and below them the collection picked (?list=).
    • ?list= is left out when it would name the workspace's own collections.
    • With no workspace it is disabled, and says "Pick a workspace to browse its records."
  • Old addresses. An address that names its workspace only in ?list=, such as /app/?list=/workspace/alpha/question, is rewritten to /app/workspace/alpha?list=/workspace/alpha/question.
  • Dev server proxy. The API path pattern now also matches /workspace followed by a query.

Controls

  • Source Explorer's filter searches only the commits loaded so far, and says so.
  • File Explorer's matches have the plain file icon: the path list names no media type, and the page maps no extensions.
  • A workspace's own page shows the graph card, empty until a record opens, and the note "Pick a collection in Record Explorer, then an item, to open it here."
  • Test count. The suite drops from 1557 to 1104 tests, because core-agent's own tests went with it.

Verification

  • bun run check: exit 0, 1104 pass, 0 fail.
  • bun run e2e with E2E_PORT_API=9019 E2E_PORT_DEV=8970 E2E_PORT_BUILT=8971: 173 passed, 11 skipped (the dev-only tests, in the built bundle).
  • bun run build in packages/app-vscode: built extension.cjs.
  • Unit tests:
    • tests/file-tree.test.ts: the folders above a file, and none outside the tree.
    • tests/api.test.ts: /workspace and /workspace/ list alpha and beta, with no index link.
    • tests/git-api.test.ts: /paths links its file template.
    • packages/app-vscode/src/utils/redact.test.ts: the redaction test, moved from core-agent.
  • e2e, new or changed:
    • The root lands on the workspace list, Record Explorer is disabled, and no request goes to /collections.
    • Clicking alpha, then Question, then Q_1 opens each in turn.
    • The two old ?list= addresses are rewritten to their path forms.
    • Opening notes/plan.md from a link opens notes in File Explorer and marks the row.
    • The Items filter is hidden until its button. It narrows the list to Q_2, and Escape hides and empties it.
    • File Explorer's filter for "plan" lists notes/plan.md, which was not loaded, as 1 match, and opens it.
    • Source Explorer's filter for "side work" leaves the commit "Side work", and says how many loaded commits it searched.

Linked issues

None. This follows #672.

🤖 Generated with Claude Code

danbarua and others added 4 commits October 12, 2026 13:53
The VS Code extension runs labkit-effect's agent; it took only two
logging helpers from core-agent (diagnosticError, redactDiagnostics),
which move into app-vscode with their test. docs/agent/ was
core-agent's guidance and goes too, except the note on what ACP's
messages mean, now docs/acp-language.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…File Explorer

So its row and the box that marks it show. A folder closed afterwards
stays closed until another file below it opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…search button

The button sits at the right of the list's header; the box shows only
when asked for, and hiding it (the button or Escape) empties it.
- File Explorer's filter searches every committed path (/paths), so a
  file in a folder not yet opened is found; /paths now links each
  path's file by a templated link.
- Source Explorer's filter narrows the commits loaded so far and says
  how many it searched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne workspace

- GET /workspace lists the workspaces; the landing view reads it, and
  the app reads nothing from /collections. /collections/workspace stays
  for other API clients.
- Picking a workspace opens /app/workspace/<slug>. In a workspace,
  Record Explorer lists its collections and the one picked below;
  before one is picked it is disabled and says so. ?list= is left out
  when it would name the workspace's own collections.
- An address that names its workspace only in ?list= is rewritten to
  name it in its path.
- The dev server's API proxy matches /workspace followed by a query.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added area:web The web app and shared UI: app-web, ui, design, records, view-model, acp-client area:agent The agent and its hosts: core-agent, app-acp, app-vscode, acp-fake, acp-scenarios, acp-transcripts labels Oct 12, 2026
@danbarua
danbarua merged commit d0ad7a4 into main Oct 12, 2026
10 checks passed
@danbarua
danbarua deleted the workspace-scope branch October 12, 2026 15:26
danbarua added a commit that referenced this pull request Oct 13, 2026
…EAD (#674)

## Problem

#673 made File Explorer open the folders above the open file, but only
when the open file's address is in the tree at HEAD
(`/workspace/{slug}/file/{path}`). A commit's changed files and the
graph's file nodes open a file as it was at that commit
(`/workspace/{slug}/commit/{id}/file/{path}`). File Explorer had no row
for that address, so its folders stayed closed. #673's test opened the
HEAD address directly, so it did not catch this.

## Change

- **API.** A file read at a commit links the same path at HEAD as
`head`, when the tree at HEAD holds a file there. A file read at HEAD
has no `head` link.
- **File Explorer.** It follows the open file's `head` link: it opens
that path's folders and marks its row with the box. A file open at HEAD
is followed as before.

## Controls

- **A file HEAD no longer holds,** such as one deleted later, has no
`head` link, so File Explorer opens no folders and marks no row.
- **The marked row is the HEAD file.** File Explorer marks the file at
HEAD, while the centre shows the file as it was at the commit.

## Verification

- `bun run check`: exit 0, 1105 pass, 0 fail.
- `bun run e2e` with `E2E_PORT_API=9019 E2E_PORT_DEV=8970
E2E_PORT_BUILT=8971`: 175 passed, 11 skipped (the dev-only tests, in the
built bundle).
- **Unit test** (`tests/git-api.test.ts`): `src/a.ts` at the first
commit links `head` to `/workspace/alpha/file/src/a.ts`. `data/blob.bin`
at the first commit, dropped later, has no `head` link. `src/a.ts` read
at HEAD has no `head` link.
- **e2e** (dev server and built bundle): with File Explorer and Source
Explorer open, opening the commit "Change a, plan the work" and clicking
its changed file `notes/plan.md` opens the commit's version
(`/commit/{id}/file/notes/plan.md`). It also opens `notes` in File
Explorer, and marks `plan.md`.

## Linked issues

None. Follows #673.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent The agent and its hosts: core-agent, app-acp, app-vscode, acp-fake, acp-scenarios, acp-transcripts area:web The web app and shared UI: app-web, ui, design, records, view-model, acp-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant