AGENTS.md instructions for /Users/savekirk/dev/ai/entire/session-bridge <INSTRUCTIONS>…
- User
AGENTS.md instructions for /Users/savekirk/dev/ai/entire/session-bridge
Project Structure & Module Organization
src/extension.tsis the extension entrypoint and wires activation, commands, and views.src/components/contains UI-facing providers and panels such as the status bar item, checkpoint tree, and active session tree.src/checkpoints/holds the session/checkpoint domain logic, git enrichment, storage, transcript parsing, and search helpers. General utilities live in top-levelsrc/*.tsfiles such asworkspaceProbe.tsandrunCommand.ts. Tests live undersrc/test/, with reusable checkpoint fixtures insrc/test/checkpoints/fixtures/.media/stores extension icons. Treatdist/andout/as generated output.Build, Test, and Development Commands
pnpm compile: run type-checking, ESLint, and the esbuild bundle intodist/extension.js.pnpm watch: run esbuild watch mode andtsc --watchtogether for local development.pnpm check-types: run strict TypeScript checks only.pnpm lint: lintsrc/with the repository ESLint config.pnpm test: compile tests, rebuild the extension, and run the VS Code test harness.pnpm package: build the production bundle used for publishing.
Coding Style & Naming Conventions
Use strict TypeScript and follow the existing code style: tabs for indentation, semicolons, and mostly single-quoted imports/strings. Use
PascalCasefor classes, providers, and exported types; usecamelCasefor functions and locals; useUPPER_SNAKE_CASEfor extension-wide constants. Keep command and context identifiers namespaced, for examplesession.bridge.entire.refresh. Let ESLint catch small consistency issues, and do not hand-edit generated files indist/orout/.Testing Guidelines
Write tests as
*.test.tsundersrc/test/, mirroring the feature area when possible, such assrc/test/checkpoints/. This project uses Mocha with@vscode/test-cliandvscode-test, compiling test files toout/test/**/*.test.js. Prefer fixture-backed tests for checkpoint parsing, git metadata joins, and tree/detail view models. No formal coverage threshold is configured, but every behavior change should include or update targeted tests. - User
<environment_context> /Users/savekirk/dev/ai/entire/session-bridge zsh <current_date>2026-04-07</current_date> Africa/Nairobi </environment_context>
- User
Can we make the detail checkpoint information to show on the right sidebar instead of be shown like an editor? We want to make sure user can view their code and checpoint details at the same tim e
- Assistant
I’m checking how checkpoint details are currently opened and where the view containers are registered so I can move that detail surface into the right sidebar without breaking the existing code view.
- Assistant
I found the existing detail surface in
src/components/checkpointDetailPanel.tsand the command wiring insrc/extension.ts. Next I’m reading those plus the contributed views so I can swap the detail target from editor area to a dedicated right-side view. - Assistant
The current detail UI is a reusable HTML renderer behind a singleton
WebviewPanel, which is good news: I can keep most of the markup and swap only the host from editor panel to a sidebar webview view. I’m reading the rest of that module now to see what needs to be generalized. - Assistant
I need one API detail before editing: whether this VS Code target lets the extension contribute directly into the secondary sidebar, or whether the right-side placement is only user-movable. I’m checking the installed VS Code typings/schema instead of guessing.
- Assistant
VS Code’s current guidance is the constraint here: extensions can switch from editor webviews to a sidebar/webview view, but they still can’t place a view directly into the secondary sidebar by default. I’m going ahead with the part we control: a dedicated “Checkpoint Details” view that opens in the extension’s sidebar and can then be moved by the user to the right-hand secondary sidebar.
- Assistant
Plan:
- Add a dedicated
Checkpoint Detailscontributed view and register aWebviewViewProviderfor it. - Refactor the existing detail webview host from
WebviewPanelto a sidebar-backed provider while keeping the current HTML renderer and actions. - Update commands to focus/populate that view instead of opening an editor tab.
- Add targeted tests for the new empty/sidebar rendering state, then run typecheck and tests.
- Add a dedicated
- Assistant
I’ve got the shape. I’m editing the detail module to become a
WebviewViewProvider, adding a new contributedCheckpoint Detailsview, and wiring the existing explain/raw-transcript commands to populate and focus that view instead of opening an editor tab. - Assistant
The detail module is larger than I want to patch blind. I’m pulling the exact bottom portion now so I can land the refactor cleanly in one pass instead of fighting mismatched contexts.
- Assistant
I’m wiring the new provider into activation now. After that I’ll add the contributed view entry and a small test for the empty-state copy so we cover the sidebar-specific behavior.
- Assistant
The code paths are in place. I’m running typechecking now to catch the API edge cases from moving from
WebviewPaneltoWebviewView, especially around view state and message handling. - Assistant
Typecheck exposed two real issues: one was just a narrowing fix, but the other was a behavior bug from the old panel code path. The raw-transcript view was computing its “back” target after it had already replaced the current state with “loading”, so the back link was getting lost. I’m fixing both now.
- Assistant
Typechecking is clean. I’m running the project test flow now so the new view contribution and the renderer changes get exercised under the normal extension build path, not just
tsc. - Assistant
The extension build and UI tests passed, but the full harness is still tripping an existing
Workspace Probetimeout under the VS Code host. I’m rerunning once to separate a flaky host timeout from a regression introduced by this change. - Assistant
The feature is working and the full test run is now green on rerun. I’m doing one last pass over the touched files to make sure the resulting behavior is coherent from the user’s side before I close this out.
- Assistant
I found a newer VS Code release note that may change the answer on direct right-sidebar placement. I’m verifying the installed package contribution schema before I stop, because if
secondarySidebaris supported here we can wire the detail view to the right side by default instead of relying on the user to move it. - Assistant
Checkpoint details no longer open as editor tabs. They now render in a dedicated
Checkpoint Detailswebview view, soExplain Checkpoint,Explain Commit, andOpen Raw Transcriptkeep your code visible while showing the detail surface in the sidebar. The core changes are in checkpointDetailPanel.ts, extension.ts, and the new contributed view in package.json. I also added coverage for the sidebar empty state in checkpointUi.test.ts.One caveat: this now opens in a sidebar view, but putting it on the right-hand Secondary Sidebar is still a VS Code layout choice. If you move the new
Checkpoint Detailsview to the Secondary Sidebar once, VS Code should remember that layout. Current VS Code docs still describe Secondary Sidebar placement as user-movable: and . - User
There is no data provider registered that can provide view data.error for checkpoint details - Assistant
I’m checking the contributed view definition first. That error usually means VS Code still thinks the view is a tree view, which happens if the new detail view wasn’t declared as a webview contribution.
- Assistant
The registration code is fine. The problem is in
package.json:Checkpoint Detailsis still contributed like a normal tree view, so VS Code asks for a tree data provider and ignores the webview provider. I’m fixing that by marking the view astype: "webview". - Assistant
The error was the view contribution, not the provider code.
Checkpoint Detailswas still declared as a normal tree view, so VS Code expected a tree data provider and showed that error.I fixed it by marking the view as a webview in package.json:
json{ "id": "session.bridge.entire.checkpointDetail", "name": "Checkpoint Details", "icon": "media/dark/history.svg", "type": "webview" }Verification:
pnpm testpasses.If you already have the extension host running, reload the window or restart the extension host so the updated
package.jsoncontribution is picked up.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.