Skip to content

feat(workspace): Workspace sidebar + remove catalog + Chat button (#457, #215) - #495

Merged
jeonghun-jj-lee merged 5 commits into
mainfrom
fix/215-workspace-sidebar-rebased
Aug 22, 2026
Merged

feat(workspace): Workspace sidebar + remove catalog + Chat button (#457, #215)#495
jeonghun-jj-lee merged 5 commits into
mainfrom
fix/215-workspace-sidebar-rebased

Conversation

@jeonghun-jj-lee

@jeonghun-jj-lee jeonghun-jj-lee commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Consolidates PRs #458 (remove catalog) and #459 (workspace sidebar), rebased onto main, with 6 bug fixes and new features.

What changed

Remove catalog (#457)

  • Strip amicode.armonia + amicode.catalog view declarations
  • Remove dead trees.ts, catalog widget code

Workspace sidebar (opencode#215 AC6)

  • WorkspaceTreeProvider renders workspace folders, respects files.exclude, hides .git
  • Full context menus: New File, New Folder, Rename, Delete, Copy Path, Copy Relative Path, Reveal in Finder, Open in Terminal, Open to Side, Remove from Workspace, Add Folder
  • Live refresh on filesystem changes + workspace folder add/remove
  • viewsWelcome for empty workspace state
  • Remove stale amicode.runInspector declaration (provider deleted in Inspectors → Work Column: retire the bottom panel #351)

Chat with Amico button

  • Yellow SVG chat-bubble icon as the first tree item — no section header overhead
  • Mutes (gray icon + '(open)' description) when a chat tab is active
  • ChatPanel.onLiveChange callback for cross-component state tracking

Bug fixes (from Raghav's original code)

  1. .startsWith('.git') filter was hiding .gitignore/.github — now only hides the .git directory itself
  2. Built-in explorer.* commands don't fire in custom trees — registered custom amicode.workspace.* commands
  3. Tree didn't listen to onDidChangeWorkspaceFolders — removing a folder left the sidebar stale
  4. credential_scanner e2e test: guard opencode-provider assertion for machines without that specific provider

Tests

  • 24 new tests covering tree rendering, all context-menu commands, and muted state
  • Full suite passes: 101 files, 1217 tests green

Closes #457. Part of opencode#215.

Summary by CodeRabbit

  • New Features

    • Added a Workspace view for browsing workspace folders and files.
    • Added actions to create, rename, delete, and open files and folders.
    • Added path copying, OS reveal, terminal opening, side-by-side opening, and workspace-folder management.
    • Workspace view now shows chat activity and refreshes as panels change.
  • Changes

    • Replaced the Catalog view and catalog-card experience with the Workspace view.
    • Saving pulses now uses a user-selected file location.
    • Added an empty-state welcome prompt for new workspaces.

Rchari1 and others added 5 commits August 21, 2026 19:47
Purge the legacy UX3 session catalog UI that predates the vault-backed
CatalogStore (Q94/Q95, packages/amico-run). The CATALOG activity-bar tab
(SessionCatalogTree → amicode.catalog, amicode.catalog.save/refresh/remove,
catalogCard webview + catalogcard component) is superseded by the mount stack
+ pack interface (WS1 #391) and is also slated for removal in opencode#215 AC7.

- package.json: drop amicode.catalog view + catalog commands/menus
- trees.ts: delete SessionCatalogTree/CATALOG_KEY, keep armonia placeholder
  (will be replaced by Workspace tree per 215)
- extension.ts: remove registerCatalogCard + catalog save/refresh/remove
  wiring, simplify amicode.savePulse to file-only Save dialog,
  drop demo promote-to-catalog prompt, remove runs_manager promote-to-
  catalog prompt (now info-only)
- esbuild.config.mjs: drop catalog_card_webview bundle
- delete catalog_card_shell/webview, media catalogcard, test suite

Pulse save stays via Save to file… → savePulseTo; vault CatalogStore
(packages/amico-run) untouched. Closes #457
Add WorkspaceTreeProvider — renders all workspace folders as collapsible
roots, expands recursively via vscode.workspace.fs.readDirectory(),
respects files.exclude, shows theme icons via resourceUri, opens files
on click, context menus (Copy Path, Reveal), and live-updates via
FileSystemWatcher. Replaces amicode.armonia placeholder; Catalog already
removed in #457.

package.json: rename amicode.armonia → amicode.workspace ("Workspace"),
keep runInspector, update activationEvents onView:workspace, add
view/item/context for workspace files.

Follows opencode#215 decision surface: Location.Ref.directories carries
all roots, no external-directory prompts, instructions stacked per dir.
Pairs with opencode PR #219 (engine: schema + boundary + env + instruction
multi-root + DB).
Add New File/Folder, Rename, Delete, Copy Path/Relative, Reveal,
Open in Terminal to amicode.workspace viewItem context. Ensures
AC6 full context-menu coverage; Run Inspector stays as separate
webview (amicode.runInspector) not a directory in the tree.
…rom Workspace

- Add 'Chat with Amico' as first tree item with custom yellow SVG icon
  that mutes (gray) when a chat tab is open
- Register custom workspace commands (newFile, newFolder, rename, delete,
  copyPath, copyRelativePath, revealInOS, openInTerminal, openToSide,
  removeFromWorkspace, addFolder) since built-in explorer.* commands
  don't fire in custom tree views
- Remove stale amicode.runInspector webview declaration (provider was
  deleted in PR #351, only the package.json entry remained)
- Add viewsWelcome for empty workspace state
- Listen to onDidChangeWorkspaceFolders to keep tree in sync
- Add ChatPanel.onLiveChange callback for cross-component state tracking
- Fix credential_scanner e2e test: guard opencode-provider assertion
  (machine may have creds under different provider names)
- Add comprehensive test suite for workspace tree and context-menu commands
  (24 tests covering tree rendering, all commands, muted state)
@jeonghun-jj-lee
jeonghun-jj-lee merged commit 8575df2 into main Aug 22, 2026
5 of 8 checks passed
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e1ad6b0b-7e11-4d30-b13a-791cb8d6d665

📥 Commits

Reviewing files that changed from the base of the PR and between b79f957 and d4826b2.

⛔ Files ignored due to path filters (2)
  • packages/extension/media/chat-muted.svg is excluded by !**/*.svg
  • packages/extension/media/chat-yellow.svg is excluded by !**/*.svg
📒 Files selected for processing (14)
  • packages/extension/esbuild.config.mjs
  • packages/extension/media/ui/components/catalogcard.ts
  • packages/extension/package.json
  • packages/extension/src/catalog_card_shell.ts
  • packages/extension/src/catalog_card_webview.ts
  • packages/extension/src/chat_panel.ts
  • packages/extension/src/extension.ts
  • packages/extension/src/runs_manager.ts
  • packages/extension/src/trees.ts
  • packages/extension/src/workspace_tree.ts
  • packages/extension/test/__mocks__/vscode.ts
  • packages/extension/test/catalog_shell.test.ts
  • packages/extension/test/credential_scanner.test.ts
  • packages/extension/test/workspace_tree.test.ts

📝 Walkthrough

Walkthrough

The extension removes the catalog UI and catalog-card flow. It adds a workspace tree with file and folder operations, updates activation and context-menu contributions, tracks chat panel activity, and adjusts pulse-save behavior and tests.

Changes

Workspace sidebar migration

Layer / File(s) Summary
Catalog UI removal and pulse-save changes
packages/extension/src/trees.ts, packages/extension/src/extension.ts, packages/extension/src/runs_manager.ts
The session catalog provider and catalog wiring are removed. Pulse saving uses a file destination, and demo promotion directs users to amicode.savePulse.
Workspace tree provider
packages/extension/src/workspace_tree.ts
The workspace tree displays folders and files, filters excluded entries, watches changes, opens files, and provides file and folder commands.
Workspace contributions and chat activity
packages/extension/package.json, packages/extension/src/extension.ts, packages/extension/src/chat_panel.ts
The extension contributes the amicode.workspace view and workspace commands. Chat panel creation and disposal update the workspace chat state.
Workspace tests and VS Code mocks
packages/extension/test/workspace_tree.test.ts, packages/extension/test/__mocks__/vscode.ts, packages/extension/test/credential_scanner.test.ts
Mocks support workspace APIs. Tests cover tree rendering, file operations, context-menu commands, and missing credential handling.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant WorkspaceTreeView
  participant WorkspaceTreeProvider
  participant VSCodeWorkspace
  User->>WorkspaceTreeView: open workspace view
  WorkspaceTreeView->>WorkspaceTreeProvider: request roots and children
  WorkspaceTreeProvider->>VSCodeWorkspace: read workspace folders and directory entries
  VSCodeWorkspace-->>WorkspaceTreeProvider: return filesystem entries
  WorkspaceTreeProvider-->>WorkspaceTreeView: render workspace items
  User->>WorkspaceTreeView: select file or folder command
  WorkspaceTreeView->>VSCodeWorkspace: create, rename, delete, copy, or open item
Loading

Suggested reviewers: rchari1, kateebonner

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/215-workspace-sidebar-rebased

Comment @coderabbitai help to get the list of available commands.

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.

Remove pulse catalog + CATALOG sidebar tab and associated widgets

2 participants