feat(terminal): add per-pane workspace selection#97
feat(terminal): add per-pane workspace selection#97zeemy23 wants to merge 14 commits intostrantalis:mainfrom
Conversation
Add a Skills section to Settings that discovers, displays, edits, and syncs Agent Skills (SKILL.md files) across Claude Code, Codex, Copilot, and Agent directories. Supports global and project-scoped skills with CRUD operations, cross-tool sync, bulk sync all, and auto-sync on create. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add an X button to the detail pane header for closing it, and show full tool names (Claude Code, Codex, Copilot, Agents) on hover over the single-letter badges. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace native title attributes with CSS pseudo-element tooltips that appear instantly on hover, showing full tool names (Claude Code, Codex, Copilot, Agents). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a floating button in the bottom-right corner of terminal panes that appears when hovering and the terminal is scrolled up from the bottom. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add directory traversal validation for dirName in save/delete paths - Preserve source file permissions in copyDir during sync - Reload skills reactively when active workspace changes - Relax dirName regex to allow leading hyphens/underscores - Add comprehensive test suite for skills service Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add blank line between embedded and regular fields in SkillContent - Use errors.New instead of fmt.Errorf for static error strings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow each terminal pane to be tied to a different workspace via a compact dropdown in the pane header. When splitting, the new pane inherits the source pane's workspace override. Cross-workspace tab drags are silently prevented to avoid mixing terminal contexts. - Add optional workspaceId/workspaceName fields to TerminalLayoutNode - Use pane-level effective workspace for terminal create/close calls - Add handleChangePaneWorkspace handler that swaps all terminals - Show workspace selector only when 2+ non-archived workspaces exist - Guard handleTabDrop and handleTabSplitDrop against cross-workspace moves - Clear override when selecting the global workspace (no-op storage) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile OverviewGreptile SummaryThis PR introduces per-pane workspace overrides for the terminal layout, adding It also includes a larger set of changes adding a Skills manager (backend service + Wails bindings + frontend UI) and a terminal scroll-to-bottom affordance. Blocking issue: when a tab is split-dropped into a new pane, the newly created pane does not carry over the source pane’s workspace override, so the new pane can incorrectly fall back to the global workspace for subsequent terminal creation/closure logic. Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| pkg/worksetapi/skills_service.go | Adds skills service for listing/reading/writing/syncing SKILL.md across tool dirs; no issues found in this PR context. |
| wails-ui/workset/frontend/src/lib/components/TerminalLayoutNode.svelte | Adds per-pane workspace selector UI and uses effective workspace for TerminalPane; depends on pane nodes carrying workspace override correctly. |
| wails-ui/workset/frontend/src/lib/components/TerminalWorkspace.svelte | Implements per-pane workspace overrides, inheritance on split, and blocks cross-workspace drags; bug: split-drop-created pane doesn’t inherit workspace override. |
| wails-ui/workset/frontend/src/lib/components/settings/sections/SkillManager.svelte | Adds full SkillManager UI for creating/editing/deleting/syncing SKILL.md across tools; no issues found. |
Sequence Diagram
sequenceDiagram
participant User
participant TLN as TerminalLayoutNode
participant TW as TerminalWorkspace
participant TS as TerminalService
User->>TLN: Change workspace selector
TLN->>TW: onChangePaneWorkspace(paneId,newWsId,newWsName)
TW->>TS: closeTerminal(oldWsId, terminalId)
TW->>TS: createWorkspaceTerminal(newWsId)
TS-->>TW: terminalId
TW-->>TLN: layout updated
User->>TLN: Drag tab A -> B
TLN->>TW: onTabDrop(targetPaneId,targetIndex)
TW->>TW: compare srcWs vs tgtWs
User->>TLN: Split-drop dragged tab
TLN->>TW: onTabSplitDrop(targetPaneId,direction,position)
TW->>TW: newPane created (missing workspaceId override)
TW-->>TLN: new pane falls back to global workspace
Additional Comments (1)
In Consider setting Prompt To Fix With AIThis is a comment left during a code review.
Path: wails-ui/workset/frontend/src/lib/components/TerminalWorkspace.svelte
Line: 778:783
Comment:
**Split-drop loses workspace override**
In `handleTabSplitDrop`, the newly created pane from a dragged tab doesn’t inherit the source pane’s workspace override. When dragging within the same overridden workspace, the new pane will fall back to the global workspace (`TerminalLayoutNode` computes `effectiveWorkspaceId` from `node.workspaceId || workspaceId`), so terminals in the new pane can be opened/closed against the wrong workspace.
Consider setting `workspaceId/workspaceName` on `newPane` (e.g. from `srcPane?.workspaceId/workspaceName`) when creating it.
How can I resolve this? If you propose a fix, please make it concise. |
…buttons Reset browser default select styling with appearance: none, display: flex, and explicit line-height to match the 28px action buttons. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove display:flex, appearance:none, and line-height overrides that fought with browser select rendering. Keep box-sizing:border-box and explicit height to let flex parent alignment work naturally. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94b6039858
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| func getSkillFromPath(scope, dirName, tool, projectRoot string) (SkillContent, error) { | ||
| path, err := resolveSkillPathWithRoot(scope, dirName, tool, projectRoot) | ||
| if err != nil { |
There was a problem hiding this comment.
Reject path traversal in GetSkill requests
getSkillFromPath resolves and reads dirName without calling validateDirName, while SaveSkill/DeleteSkill do validate; this allows a crafted dirName like ../../.. to escape the intended skills directory and read arbitrary SKILL.md files reachable from the joined path. This is a security regression introduced by the new read API path and should enforce the same traversal guard before resolveSkillPathWithRoot.
Useful? React with 👍 / 👎.
| func syncSkillAtPath(scope, dirName, fromTool string, toTools []string, projectRoot string) error { | ||
| src, err := resolveSkillPathWithRoot(scope, dirName, fromTool, projectRoot) | ||
| if err != nil { |
There was a problem hiding this comment.
Validate dirName before syncing skill directories
syncSkillAtPath also skips validateDirName, so a malicious dirName can make srcDir/dstDir resolve outside the skill roots and then copyDir recursively copies unintended directories. In environments exposing this API through the UI bridge, this can copy arbitrary local content into tool skill folders and should be blocked with the same validation used by save/delete.
Useful? React with 👍 / 👎.
Merge origin/main and fix split-drop workspace override bug where newly created panes from tab split-drops did not inherit the source pane's workspace override, causing terminals to incorrectly use the global workspace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract pure layout-tree operations and keyboard navigation helpers from TerminalWorkspace.svelte into terminal/layoutTree.ts. This brings the file under 1000 lines and reduces function complexity below the max-15 threshold. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Files Changed
types.tsworkspaceId/workspaceNametoTerminalLayoutNodeTerminalWorkspace.svelteTerminalLayoutNode.svelteTest plan
🤖 Generated with Claude Code