Skip to content

feat(ui): per-project .work-files/ navigable tab - #14

Merged
JeanBaptisteRenard merged 1 commit into
mainfrom
feat/work-files-tab
May 24, 2026
Merged

JeanBaptisteRenard merged 1 commit into
mainfrom
feat/work-files-tab

Conversation

@JeanBaptisteRenard

Copy link
Copy Markdown
Collaborator

Summary

Adds a sidebar tab next to Plans / Memory that lists files under each project's .work-files/ directory, with content viewing (markdown rendered, JSON pretty-printed, plain text otherwise).

  • public/index.html — new tab button + pane
  • public/plans-memory-view.js — extends the existing pattern (loadWorkFiles / showWorkFile)
  • public/app.js — tab wiring
  • public/icons.js — folder icon
  • public/style.css — pane styling
  • main.jslist-work-files / read-work-file IPC handlers, path-validated under <projectPath>/.work-files/ to prevent directory traversal
  • preload.js — exposes the IPC channels
  • eslint.config.js — new globals for the test file
  • test/dom-work-files-view.test.js — jsdom smoke test (~315 lines covering tree rendering, content panel, IPC mocking, path-traversal guard)

Test plan

  • npm test — 53/53 pass (was 45/45 before)
  • npx eslint . — 0 errors, 217 warnings (pre-existing pattern)
  • Manual: launch electron, open a project with a .work-files/ dir, click the new tab, expand tree, click a markdown file, click a JSON file

Notes

  • Path validation rejects any .. traversal at the IPC boundary (server-side path.resolve + prefix check)
  • Watchers debounced to refresh the tree if files appear while the tab is open
  • Reuses CodeMirror bundle if syntax highlighting is desired
  • Original sub-agent ran into Anthropic rate limit before committing — work was recovered from the worktree and the commit + PR opened post-reset.

Closes the .work-files/ tab spec.

Adds a sidebar tab next to Plans/Memory listing files under each
project's .work-files/ directory, with content view (markdown
rendered, JSON pretty-printed, plain text otherwise).

IPC handlers list-work-files / read-work-file are path-validated
under <projectPath>/.work-files to prevent directory traversal.
New jsdom smoke test covers the renderer.
@JeanBaptisteRenard
JeanBaptisteRenard merged commit 6130013 into main May 24, 2026
7 checks passed
@JeanBaptisteRenard
JeanBaptisteRenard deleted the feat/work-files-tab branch May 24, 2026 02:27
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