Skip to content

feat(webui): add workspace file tree with preview and chat attach - #1519

Open
dark605 wants to merge 1 commit into
TokenRhythm:mainfrom
dark605:pr/workspace-file-tree
Open

feat(webui): add workspace file tree with preview and chat attach#1519
dark605 wants to merge 1 commit into
TokenRhythm:mainfrom
dark605:pr/workspace-file-tree

Conversation

@dark605

@dark605 dark605 commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • Sidebar file tree for browsing the session workspace (lazy per-directory loading, gitignore-aware)
  • Workbench preview panel backed by Monaco, with right-click "Copy / Add to conversation" on selections
  • Attach workspace files or text selections to the conversation composer (1 MB cap, binary/truncated files refused)

Changes

  • Gateway: new files API (src/opensquilla/gateway/files_api.py) for listing/reading workspace files, registered in the gateway app, with MemoryError guards returning 500
  • WebUI: new WorkspaceFiles domain module + Gateway Adapter over the private HTTP transport (adapters/gateway/workspaceFiles.ts); the sidebar store, preview panel, and chat attach flow consume the seam instead of raw authenticated fetches, satisfying the exact-transport-debt guard
  • Tabs: file tabs join the 8-tab workbench eviction limit; an overflow dropdown exposes compressed-out tabs
  • i18n: full key parity across en, zh-Hans, ja, fr, de, es (guarded by check-i18n)

Testing

  • Frontend: full vitest suite green (5145 tests; new tests for the adapter, fileTree store port, preview panel); npm run build passes all architecture/theme/i18n guards
  • Backend: pytest tests/test_gateway/test_workspace_files_api.py — 21 passed
  • Note: two ChannelsView tests intermittently time out under full-suite parallel load on slow machines; verified they also fail the same way on pristine upstream/main (passes in isolation) — pre-existing, unrelated to this PR

Add a sidebar file tree for browsing the session workspace, a workbench
preview panel backed by Monaco, and the ability to attach files or text
selections to the conversation composer.

- Gateway: new files API (list/read workspace files) registered in the
  gateway app, with MemoryError guards returning 500
- WebUI: new WorkspaceFiles domain module plus a Gateway Adapter over the
  private HTTP transport; the sidebar store, preview panel, and chat
  attach flow consume the seam instead of raw authenticated fetches
- Preview: idempotent Monaco editor lifecycle (v-show container), reload
  keyed by path/workspace/openNonce, right-click context menu for copy /
  add-to-composer, no flicker during streaming turns
- Tabs: file tabs join the 8-tab workbench eviction limit; an overflow
  dropdown exposes tabs hidden by compression; the collapse button is
  removed in favor of the dropdown and single-tab row
- i18n: full key parity across en, zh-Hans, ja, fr, de, es
- Tests: fileTreeModel, fileTree store, WorkspaceFiles adapter, Workbench
  Host, preview panel, workbench store, and gateway workspace files API
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