Skip to content

Workspace foundation: column plan, regional focus, semantic bindings and resource model (#330) - #375

Draft
raiseCatError wants to merge 2 commits into
release/v0.18.0from
feature/workspace-foundation
Draft

raiseCatError wants to merge 2 commits into
release/v0.18.0from
feature/workspace-foundation

Conversation

@raiseCatError

Copy link
Copy Markdown
Owner

Shared groundwork for the Workspace Sidebar (#331), the detail panel (#332) and the semantic keymap (#335), under #330. Standalone modules only: TerminalApp.ts is not modified; the integration contract is in docs/design/workspace.md and waits for the workflow track's stabilization checkpoint (#359).

  • src/workspace/layout.ts: the column counterpart of ScreenPlan. docked / compact / drawer / hidden by measured width. A docked region never squeezes the center below 60 cells (it becomes a drawer); drawers overlay the center without resizing the PTY; passthrough and idle suppress both regions. columnAt for pointer hits.
  • src/workspace/focus.ts: LEFT_SIDEBAR and RIGHT_PANEL extend Add keyboard-first managed Claude targets and unified mod inventory #329's InputOwner; no second dispatcher. Protected owners (passthrough, approval, choice, search, agent message, full-width panels, agent transcript) are never intercepted. In the composer only opt-in bindings apply, only with an empty draft, never to typing. Closing a focused region returns focus to the composer; opening one never steals focus; focus resumes after passthrough.
  • src/workspace/keymap.ts: key → semantic action per context; every action has a slash-command path; help derives from the bindings. Defaults bind nothing in the composer.
  • src/workspace/resources.ts: stable ids; activatable requires an activation intent (otherwise downgraded to unsupported with a reason); selected / focused / active / attention / stale kept apart; hostile text sanitized; trees bounded (512 items, 4 levels).

Tests: tests/workspaceFoundation.test.ts (geometry at 17 widths × 3 region combinations, PTY invariants, drawer overlap, focus protection, draft protection, transitions, resource bounds and sanitization, derived help).

Conflict-prone at integration: src/app/TerminalApp.ts, src/commands/slashCommands.ts, src/help/helpContent.ts (listed in the design doc). Physical QA (Ghostty, Terminal.app, tmux, Safe/NO_COLOR, widths 40–200) is listed there and not performed.

…and resource model

Shared groundwork for the sidebar (#331), detail panel (#332) and keymap
(#335) under #330, as standalone modules; the running app is unchanged.

- layout.ts: the column counterpart of ScreenPlan. Docked, compact, drawer
  and hidden modes by measured width; a docked region never squeezes the
  center below 60 cells (it becomes a drawer), drawers overlay the center
  without resizing the PTY, and passthrough/idle suppress both regions.
- focus.ts: LEFT_SIDEBAR and RIGHT_PANEL extend #329's InputOwner rather
  than adding a dispatcher. Protected owners (passthrough, approval,
  choice, search, agent message, panels) are never intercepted; in the
  composer only opt-in bindings apply, only with an empty draft, never to
  typing. Closing a focused region returns focus to the composer; focus
  resumes after passthrough.
- keymap.ts: key -> semantic action per context, with slash-command paths
  and help derived from the bindings. The defaults bind nothing in the
  composer.
- resources.ts: stable ids; activatable/informational/unsupported with an
  activation intent required for the first; selected, focused, active,
  attention and stale kept apart; hostile text sanitized; trees bounded.

docs/design/workspace.md records the integration contract for
TerminalApp.ts, which waits for the workflow track's stabilization
checkpoint (#359).

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