Skip to content

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

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

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

Conversation

@raiseCatError

@raiseCatError raiseCatError commented Oct 11, 2026 •

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.

Update (1740f4e, 111af0d), quality and security pass: resourceText turned only the ESC of a sequence into a space, so a tmux session named with an OSC title showed as evil ]0;PWNED session; whole sequences are removed first now (stripTerminalControls). Below about 80 columns a drawer covered the composer that had the keyboard, and at 40 columns both drawers stacked: with focus: regionOf(owner), the plan draws an open drawer only while it is focused and reports the others as tucked (still open, no resize); applyFocusAction(state, action, columns) focuses a region opened where it can only be a drawer, and toggling a tucked drawer brings it forward. Without the new arguments behavior is unchanged. Regressions in tests/workspaceFoundation.test.ts. CI green on 111af0d.

…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).
…awers follow the keyboard

- resourceText turned only the ESC of a sequence into a space, so a tmux session named with an OSC title showed as
  "evil ]0;PWNED session". It removes whole sequences first (NMSh's stripTerminalControls), then controls.
- Below about 80 columns a drawer covered the composer while the composer had the keyboard, and at 40 columns both
  regions were full-width drawers on top of each other. Given the focused region, the plan draws an open drawer only
  while it is focused and tucks the others (still open, not drawn, no resize); opening a region that can only be a
  drawer focuses it. Without the new arguments, behavior is unchanged.
raiseCatError added a commit that referenced this pull request Oct 11, 2026
…sk quality and security pass

New heads for #375-#378, #383 and #384; a prioritized findings table with the fixes and their commits; the
investigated locations that are not vulnerabilities (the demo renderer, configAssist.ts:164, the session socket, Git
in untrusted repositories, dependencies); what cannot be validated before integration; and the contract changes
Codex needs at integration, including one precedence for Up from an idle composer.
@raiseCatError

Copy link
Copy Markdown
Owner Author

Integrated, not merged here: this head (111af0da) is part of the release line that shipped in v0.20.0 through the authoritative release PR #392 (merge commit 65e4de55). Closing because its changes reached master by that route; the branch is kept for history.

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