Skip to content

Add a read-only workspace file observatory - #94

Draft
John-Ryan21337 wants to merge 3 commits into
cafeai:devfrom
John-Ryan21337:adoption/cafe-dev-workspace-observatory-20260911
Draft

John-Ryan21337 wants to merge 3 commits into
cafeai:devfrom
John-Ryan21337:adoption/cafe-dev-workspace-observatory-20260911

Conversation

@John-Ryan21337

Copy link
Copy Markdown
Contributor

Adds a read-only workspace file observatory for the selected project. Open it from the chat view, choose up to eight files, and compare bounded text snapshots while refresh is explicitly enabled. This is an independent adoption proposal on current Cafe dev (99fbaec8), tracked in #87.

The server resolves the workspace from its registered project identifier. Authenticated RPCs return at most 500 tree entries and 128 KiB of preview text; generated, hidden and obvious credential paths are withheld. Exact path spelling survives RPC decoding, symlink and Windows alias checks run before access, and wedged filesystem operations retain their admission slots. Refresh responses remain scoped to the selected environment, project and pane.

Limits: text masking is best effort, portable path validation cannot exclude every hostile concurrent directory swap, and snapshot changes do not identify the writer. This slice has no database inspector, file writes or provider attribution. Each filesystem stage has a five-second deadline; this is not a single end-to-end request deadline.

Independent audit repaired a session-key collision, trimmed filename aliases and quadratic credential-name matching. Synthetic regression cases failed before those repairs and pass afterward. The full graph also exposed an incomplete API test fixture; the repaired fixture now verifies exact project and path forwarding.

Validation on Windows: yarn fmt, yarn lint, yarn typecheck (10/10), yarn test --concurrency=2 (10/10; server 2,046 passed and two expected skips), full Chromium 323/323, and yarn build:desktop --force (3/3). Generated server, desktop and renderer bundles were checked. Focused coverage includes 41 server boundary tests, the authenticated RPC integration, 17 component cases and 25 API tests. Both server skips are POSIX-only FIFO cases, including the inherited bootstrap test; platform-specific script skips are unchanged. No live account or user workspace was tested.

Review media uses synthetic files and the real component stylesheet:

Before
After
Interaction recording, 11.12 seconds

Scope, limits and verification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant