Skip to content

Workspace detail panel: bounded read-only details (#332) - #377

Draft
raiseCatError wants to merge 6 commits into
feature/workspace-foundationfrom
feature/workspace-panel
Draft

raiseCatError wants to merge 6 commits into
feature/workspace-foundationfrom
feature/workspace-panel

Conversation

@raiseCatError

@raiseCatError raiseCatError commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

#332, stacked on the workspace foundation (#375). Standalone; TerminalApp.ts untouched. Independent of the sidebar PR (#376): they share only foundation types and have separate design documents.

  • Typed, bounded, read-only content naming its source, observation time and, when incomplete, what is missing. Providers are pure over data the caller already has; the panel performs no I/O and never interprets PTY output. It is not an editor.
  • resourceDetail: what Enter would do in words, or why the resource cannot be opened.
  • worktreeDetail: Git's facts from /worktrees; an unknown status is never shown as clean.
  • diffContent: local git diff text through the GitHub review diff's parsePatch and line sanitizer; binary and rename-only files named; a line budget with a visible "cut here"; a deleted line beginning with - keeps its own dash.
  • factDetail: a fact's displayable value under its privacy policy, evidence, age, freshness, policy and what the capability reads. Module diagnostics (why shown, timings, engine health) stay Module observability: explain visibility, provenance, collection timings and cache state #365's (implemented in Output references, paste batches, queue conditions, pins and recipes #368's ModulesPanel); at integration the panel should present that explain output instead of growing a second view.
  • PanelController: scroll kept across refreshes of the same content; a bounded cache so sidebar selection can preview without asking an owner again.
  • renderPanel: exactly rows × width; focus mark, stale/time unknown/partial labels and diff markers as text, so NO_COLOR/Safe lose nothing.

Not included: provider task/plan presentation (needs #339's provider-owned task state), approval details (Managed Target approval flow), GitHub PR detail (the /github manager), editor hand-off commands.

Tests: tests/workspacePanel.test.ts. Design: docs/design/workspace-panel.md.

Update (fcad006, f5ef4b2), quality and security pass: merges the foundation fixes. The diff --git heading used a lazy regex across the whole section: about 2 ms per hostile header (1.8 s for a 1,000-file diff of mode changes), and my b/file was shown as a rename my → file b/my b/file. The heading is parsed from its own line in linear time. The panel also returns to each cached content's scroll position. Regressions in tests/workspacePanel.test.ts. CI green on f5ef4b2.

…trees, diffs and modules

#332, stacked on the workspace foundation; standalone, no app wiring yet.

- Typed content with its source, observation time and an explicit partial
  note; providers are pure over data the caller already has.
- resourceDetail says what opening would do, or why it cannot.
- worktreeDetail shows Git's facts; an unknown status is never "clean".
- diffContent reads local `git diff` text through the review diff's
  parsePatch and line sanitizer: binary and rename-only files are named,
  a line budget cuts with a visible note, a deleted line starting with "-"
  keeps its own dash.
- factDetail is a module's explain view: displayable value under its
  privacy policy, evidence, age, freshness, policy and what it reads.
- PanelController keeps scroll for refreshed content and a bounded cache so
  sidebar selection can preview without asking an owner again.
- renderPanel: exactly rows x width, focus mark and stale/partial labels
  without color, diff markers kept as text.
…ith " b/"; scroll kept per content

- The diff --git heading used a lazy pattern across the whole section: about 2 ms per header for names full of
  " b/", 1.8 s for a 1,000-file diff of mode changes, and "my b/file" was shown as a rename "my → file b/my b/file".
  The heading is read from its own line: equal halves first, then the first " b/" for renames.
- Going back to content still in the cache returns to where it was scrolled.

This branch has not been deployed

No deployments
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