Make Changes and the terminal project-owned #15

Closed
opened 2026-08-28 19:24:44 +00:00 by dikka · 1 comment
Owner

What to build

Make Changes and the embedded terminal belong to a saved project's normalized directory instead of requiring a selected session. A project with zero sessions can open both. Changes remains a full main-area destination showing the project's current read-only working-copy diff; it never attributes files to a session or turn and does not become a split inspector.

Opening and closing Changes preserves the selected session's stream position and drafts. Keep existing Jujutsu-before-Git detection, bounded patch behavior, and failure distinctions, but authorize requests through the saved project directory rather than an arbitrary browser path.

Retain a project-wide collapsible terminal-only panel as the default terminal presentation. Remove the old information column and activity strip from that panel; context, timing, runtime diagnostics, and opaque extension details move to an on-demand details presentation. Exact responsive sizing may be chosen through real-app QA.

Acceptance criteria

  • A saved project with no session can open its Changes destination and project terminal.
  • Changes derives authority from the normalized saved project directory and retains bounded read-only Jujutsu-before-Git behavior.
  • Changes does not claim session/turn attribution and remains a full main-area destination rather than a side split.
  • Returning from Changes restores session stream position and does not alter or discard drafts.
  • The terminal uses one project identity independent of session selection and remains collapsible and resizable.
  • The terminal panel contains the terminal rather than the previous permanent information/activity composition.
  • Clean, no-repository, missing path, unavailable command, timeout, malformed, and oversized Changes results remain distinct.
  • Project authority, diff, terminal lifecycle, navigation preservation, and desktop/narrow real-app QA pass.

Blocked by

  • #4 — Persist terminal-observed sessions as workspace records
  • #6 — Read known sessions as paged active-branch streams

Human checkpoint note: Do not request routine per-ticket approval. The implementing agent may make the internal architecture, refactoring, testing, and UI-detail decisions needed to satisfy the acceptance criteria. Pause only if implementation requires a material product or ownership change, a destructive or hard-to-reverse action, excluded security or deployment scope, credentials or spending, or a real-browser design fork with no safe default. Forgejo completion updates may be batched with the rest of the completed frontier. The user performs final hub and Pi restart steps. Agents must not start, restart, replace, or stop the user-run Pilcrow development server.

## What to build Make Changes and the embedded terminal belong to a saved project's normalized directory instead of requiring a selected session. A project with zero sessions can open both. Changes remains a full main-area destination showing the project's current read-only working-copy diff; it never attributes files to a session or turn and does not become a split inspector. Opening and closing Changes preserves the selected session's stream position and drafts. Keep existing Jujutsu-before-Git detection, bounded patch behavior, and failure distinctions, but authorize requests through the saved project directory rather than an arbitrary browser path. Retain a project-wide collapsible terminal-only panel as the default terminal presentation. Remove the old information column and activity strip from that panel; context, timing, runtime diagnostics, and opaque extension details move to an on-demand details presentation. Exact responsive sizing may be chosen through real-app QA. ## Acceptance criteria - [ ] A saved project with no session can open its Changes destination and project terminal. - [ ] Changes derives authority from the normalized saved project directory and retains bounded read-only Jujutsu-before-Git behavior. - [ ] Changes does not claim session/turn attribution and remains a full main-area destination rather than a side split. - [ ] Returning from Changes restores session stream position and does not alter or discard drafts. - [ ] The terminal uses one project identity independent of session selection and remains collapsible and resizable. - [ ] The terminal panel contains the terminal rather than the previous permanent information/activity composition. - [ ] Clean, no-repository, missing path, unavailable command, timeout, malformed, and oversized Changes results remain distinct. - [ ] Project authority, diff, terminal lifecycle, navigation preservation, and desktop/narrow real-app QA pass. ## Blocked by - #4 — Persist terminal-observed sessions as workspace records - #6 — Read known sessions as paged active-branch streams > **Human checkpoint note:** Do not request routine per-ticket approval. The implementing agent may make the internal architecture, refactoring, testing, and UI-detail decisions needed to satisfy the acceptance criteria. Pause only if implementation requires a material product or ownership change, a destructive or hard-to-reverse action, excluded security or deployment scope, credentials or spending, or a real-browser design fork with no safe default. Forgejo completion updates may be batched with the rest of the completed frontier. The user performs final hub and Pi restart steps. Agents must not start, restart, replace, or stop the user-run Pilcrow development server.
Author
Owner

Implemented, corrected through independent Standards/Spec review, and verified in jj revision 64131bd64afffeat(projects): authorize workspace features through opaque saved-project identities.

What shipped:

  • Workspace snapshots project bounded saved {projectId,path} records. Browser requests carry only opaque project IDs; the hub resolves exact normalized saved paths and revalidates current catalog membership after asynchronous work.
  • A process-private membership token identifies each saved-membership lifetime. Forget → re-add of the same path/project ID invalidates in-flight/coalesced Changes reads and terminal upgrades rather than reviving stale authority.
  • Saved projects with zero sessions can open Changes and directly select Terminal. Changes and terminal ownership survive last-session removal while the project remains saved.
  • Changes remains a full main-area project destination without session/turn attribution. It preserves stream scroll plus response draft/image attachment state on return.
  • Read-only Changes retains Jujutsu-before-Git detection, bounded output/time, and distinct clean, no-repository, missing-path, unavailable-command, timeout, malformed, oversized, and command-failed presentations.
  • The terminal is keyed by one active project identity independent of requiring a session, remains collapsible/resizable, and is the only permanent bottom-dock content. Context/timing/runtime/operative/opaque extension diagnostics moved to on-demand Details.
  • All explicit session-selection paths (rail, Start, Continue, History) now update active project authority consistently, preventing terminal input from remaining pointed at another working tree.
  • History → Changes, compact zero-session close/Escape/focus behavior, direct Terminal controls, and Lucide-only sidebar iconography are covered.
  • Shared project-ID validation is reused at snapshot, HTTP, and WebSocket boundaries. Retained README architecture now matches the project-owned model.
  • Producer protocol remains v10 because no required extension producer snapshot/command/result schema changed; this ticket changes hub→browser workspace projection and routes only.

Review corrections included last-session destination retention, forget/re-add authority churn, direct zero-session Terminal access, compact navigation lifecycle, destination exclusivity, centralized project/session selection, documentation, shared validation/naming, and a stable async feedback assertion. Follow-up Standards and Spec audits pass with no remaining code finding.

Verification:

  • Full suite: 75 files, 700 tests passed.
  • Focused correction suite: 161 tests passed; changed-area audit suite: 221 tests passed.
  • Feedback synchronization regression passed 20/20 implementation runs and 3/3 independent re-audit runs.
  • vp exec tsc --noEmit, vp fmt, vp check, and git diff --check: passed. vp check retains four unrelated pre-existing hub lint warnings.
  • vp run build:hub, vp run build:browser, and vp build: passed; dist/ refreshed.
  • Browser QA reused the existing user-run Vite server at 127.0.0.1:17167 without managing it. Desktop production fixture verified saved zero-session Terminal selection/path, current mocked Changes, terminal-only dock, and Details. Narrow 390×700 verified Terminal dialog, History → Changes URL replacement, and navigator Escape/close behavior.
  • The already-running development hub at 17168 was unavailable. Zero-session project authority, diff states, forget/re-add races, terminal WebSocket lifecycle, navigation preservation, and project identity are covered by real HTTP/WebSocket hub tests plus rendered production-app tests; no server was started.
Implemented, corrected through independent Standards/Spec review, and verified in jj revision `64131bd64aff` — `feat(projects): authorize workspace features through opaque saved-project identities`. What shipped: - Workspace snapshots project bounded saved `{projectId,path}` records. Browser requests carry only opaque project IDs; the hub resolves exact normalized saved paths and revalidates current catalog membership after asynchronous work. - A process-private membership token identifies each saved-membership lifetime. Forget → re-add of the same path/project ID invalidates in-flight/coalesced Changes reads and terminal upgrades rather than reviving stale authority. - Saved projects with zero sessions can open Changes and directly select Terminal. Changes and terminal ownership survive last-session removal while the project remains saved. - Changes remains a full main-area project destination without session/turn attribution. It preserves stream scroll plus response draft/image attachment state on return. - Read-only Changes retains Jujutsu-before-Git detection, bounded output/time, and distinct clean, no-repository, missing-path, unavailable-command, timeout, malformed, oversized, and command-failed presentations. - The terminal is keyed by one active project identity independent of requiring a session, remains collapsible/resizable, and is the only permanent bottom-dock content. Context/timing/runtime/operative/opaque extension diagnostics moved to on-demand Details. - All explicit session-selection paths (rail, Start, Continue, History) now update active project authority consistently, preventing terminal input from remaining pointed at another working tree. - History → Changes, compact zero-session close/Escape/focus behavior, direct Terminal controls, and Lucide-only sidebar iconography are covered. - Shared project-ID validation is reused at snapshot, HTTP, and WebSocket boundaries. Retained README architecture now matches the project-owned model. - Producer protocol remains v10 because no required extension producer snapshot/command/result schema changed; this ticket changes hub→browser workspace projection and routes only. Review corrections included last-session destination retention, forget/re-add authority churn, direct zero-session Terminal access, compact navigation lifecycle, destination exclusivity, centralized project/session selection, documentation, shared validation/naming, and a stable async feedback assertion. Follow-up Standards and Spec audits pass with no remaining code finding. Verification: - Full suite: 75 files, 700 tests passed. - Focused correction suite: 161 tests passed; changed-area audit suite: 221 tests passed. - Feedback synchronization regression passed 20/20 implementation runs and 3/3 independent re-audit runs. - `vp exec tsc --noEmit`, `vp fmt`, `vp check`, and `git diff --check`: passed. `vp check` retains four unrelated pre-existing hub lint warnings. - `vp run build:hub`, `vp run build:browser`, and `vp build`: passed; `dist/` refreshed. - Browser QA reused the existing user-run Vite server at `127.0.0.1:17167` without managing it. Desktop production fixture verified saved zero-session Terminal selection/path, current mocked Changes, terminal-only dock, and Details. Narrow 390×700 verified Terminal dialog, History → Changes URL replacement, and navigator Escape/close behavior. - The already-running development hub at 17168 was unavailable. Zero-session project authority, diff states, forget/re-add races, terminal WebSocket lifecycle, navigation preservation, and project identity are covered by real HTTP/WebSocket hub tests plus rendered production-app tests; no server was started.
dikka closed this issue 2026-08-29 09:15:06 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lab/pilcrow#15
No description provided.