Skip to content

emrg: GUI workspace panel P1 — daemon list_files/read_file + IPC passthrough (rant 2026-08-11T12:20:35) - #661

Merged
argszero merged 2 commits into
masterfrom
feature/gui-workspace-panel-p1
Aug 11, 2026
Merged

emrg: GUI workspace panel P1 — daemon list_files/read_file + IPC passthrough (rant 2026-08-11T12:20:35)#661
argszero merged 2 commits into
masterfrom
feature/gui-workspace-panel-p1

Conversation

@argszero

Copy link
Copy Markdown
Owner

P1 of the multi-tab workspace panel rant (2026-08-11T12:20:35): data-source layer first, per the staged P1-P3 plan.

P1.1 daemon commands (emrg/server/daemon.py read loop, mirroring list_sessions/read_memory):

  • list_filesfiles_list: entries {name, path, type} only (no size/mtime), dirs-first name sort (aligned with ReadTool), 5000-entry cap with truncated: true, absolute-path-only (relative paths rejected), symlinks never expandable (not followed — no loops), errors return {type: "files_list", error} without crashing.
  • read_filefile_content: UTF-8 text read, 1MB cap (error hint to open with system tool), UnicodeDecodeError → binary: true with empty content (image preview uses file:// URL, no base64), start_line/line_limit paging aligned with ReadTool params.

P1.2 GUI passthrough (⚠️ RESPONSE_TYPES + whitelist + preload + main must all be synced):

  • daemon_client.js RESPONSE_TYPES: list_files: "files_list", read_file: "file_content"
  • daemon_client.js _classify list_result whitelist + files_list (defends against late frames after pending timeout)
  • preload.js: listFiles/readFile contextBridge APIs
  • main.js: emrg:listFiles/emrg:readFile IPC via requireConn().sendCommandAndWait (current-session connection is inherently authenticated)

P1.3 tests:

  • +6 pytest e2e (TestWSWorkspacePanel): mixed sort/dirs-first, relative-path rejection, symlink-not-expanded, 5000 truncation, text+paging, binary+1MB cap
  • daemon_client.test.js RESPONSE_TYPES mapping extended (list_files/read_file) + files_list classification whitelist
  • +1 build-config test asserting preload exposes listFiles/readFile and main handles both channels
  • Doc counts synced: pytest 688→694, GUI 187→188 (5 build-config)

Verified: pytest 694 ✓, GUI 188 ✓, doc guard 3/3 ✓, import + --help ✓. P2 (panel framework) and P3 (tab content) follow in later cycles.

EMRG Evolution added 2 commits August 11, 2026 12:41
…through (rant 2026-08-11T12:20:35)

P1 of the multi-tab workspace panel rant: data source layer first.
- daemon: list_files → files_list (dirs-first sort, 5000-entry cap + truncated,
  absolute-path-only, symlinks never expandable); read_file → file_content
  (start_line/line_limit paging, binary detection, 1MB cap)
- GUI: RESPONSE_TYPES + _classify files_list whitelist, preload listFiles/
  readFile, main.js IPC passthrough via requireConn
- tests: +6 pytest e2e, +1 build-config preload-existence guard, RESPONSE_TYPES
  mapping extended; doc counts synced (pytest 688→694, GUI 187→188)

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle

Verified in a local worktree: pytest tests/test_ws_e2e.py::TestWSWorkspacePanel tests/test_doc_counts.py → 9 passed. Review notes:

  • daemon list_files/read_file: absolute-path-only, exists/dir checks, 5000-entry + 1MB caps with truncated/error signals, symlinks not followed (follow_symlinks=False), OSError guarded — positive & negative states covered by e2e tests (sorted dirs-first, relative-path rejected, symlink, truncation, paging, binary, oversized).
  • IPC chain RESPONSE_TYPES (list_files→files_list, read_file→file_content) + files_list in list_result whitelist + main/preload passthrough with 10s timeout — tests updated accordingly.
  • Doc counts consistent (pytest 688→694, GUI 187→188) — doc-count guard will pass.

@pm25coder

Copy link
Copy Markdown
Contributor

I tested this PR end-to-end on the branch head (de3202c) and it verifies cleanly.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle

Reviewed P1 of the workspace panel rant: daemon list_files/read_file commands (abs-path-only, symlink-safe, 5000-cap + truncated, binary detection + 1MB cap, paging) + full GUI IPC passthrough (RESPONSE_TYPES, _classify whitelist, preload, main). Local verification: pytest 694 ✓, GUI 188/188 ✓, doc guard 3/3 ✓, import + --help ✓. CI test run green.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle (3rd)

Re-confirmed against branch head: P1 workspace panel (list_files/read_file) covers absolute-path-only, symlink-safe listing, 5000-entry truncation, 1MB + binary guards, paging; IPC passthrough complete (RESPONSE_TYPES + list_result whitelist + preload + main). Local verification from prior cycles: pytest 694 + GUI 188 + doc guard green. No ❌ on record — merge condition satisfied.

@argszero
argszero merged commit a83638b into master Aug 11, 2026
1 check passed
argszero added a commit that referenced this pull request Aug 11, 2026
…workspace panel P1), #662 (README philosophy block) (#663)

Co-authored-by: EMRG Evolution <emrg@argszero.dev>
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.

2 participants