NS4 slice: Add read-only git status and diff panels #25

Closed
opened 2026-06-20 23:28:17 +00:00 by tmk241 · 1 comment
Owner

OBJECTIVE: Use explicit local git commands to show status, changed files, diffs, and hunks.

AUTHORITY: Parent #4 NS4: Repository workbench; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: repo/001-002; req: ui/002).

AGENT AUTHORITY:

  • Delivery authority: local-commit
  • Tracker authority: this issue may be commented and closed when acceptance passes.
  • Handoff state: committed clean, tracker commented/closed.

PARENT: #4 via explicit issue link and parent checklist.

SCOPE: The smallest source/docs/tests needed to make this behavior real and verified.

BOUNDARIES: No commit/stage/reset/checkout operations.

ACCEPTANCE: Fixture repo tests show status/diff/hunks and navigate from changed file to buffer; git errors are visible.

VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice.

BLOCKERS: none

GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant req: anchors in code/tests where applicable, and close only after verification passes.

OBJECTIVE: Use explicit local `git` commands to show status, changed files, diffs, and hunks. AUTHORITY: Parent #4 `NS4: Repository workbench`; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: repo/001-002; req: ui/002). AGENT AUTHORITY: - Delivery authority: local-commit - Tracker authority: this issue may be commented and closed when acceptance passes. - Handoff state: committed clean, tracker commented/closed. PARENT: #4 via explicit issue link and parent checklist. SCOPE: The smallest source/docs/tests needed to make this behavior real and verified. BOUNDARIES: No commit/stage/reset/checkout operations. ACCEPTANCE: Fixture repo tests show status/diff/hunks and navigate from changed file to buffer; git errors are visible. VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice. BLOCKERS: none GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant `req:` anchors in code/tests where applicable, and close only after verification passes.
tmk241 added this to the v1 milestone 2026-06-20 23:28:17 +00:00
tmk241 added the sliceready-for-agentgoal labels 2026-06-20 23:28:17 +00:00
Author
Owner

Implemented in commit 871f3b4917 (Add read-only git workbench panels).

Verification:

  • zig fmt src/repo.zig src/tui.zig: pass
  • zig build test: pass
  • zig build: pass
  • zig build run -- --help: pass
  • redgate lint / health: pass

Regular tests: real temporary git repos drive git status --short, git diff --unified=0, file read/open for changed files, and TUI status/diff panels through the shared list-panel primitive. Rows are panel-safe tokens (modified:src/main.zig, hunk:..., add:...) and changed-file open loads the working-tree content into the editor.
Adversarial tests: missing/non-repo paths produce visible git_error:... rows, status rows are validated before path extraction, and unsafe paths such as ../secret are rejected.

Boundary: read-only git status/diff/navigation only. No staging, committing, checkout, reset, git mutation, background jobs, terminal shell, or external service added.

Implemented in commit 871f3b4917c1 (Add read-only git workbench panels). Verification: - zig fmt src/repo.zig src/tui.zig: pass - zig build test: pass - zig build: pass - zig build run -- --help: pass - redgate lint / health: pass Regular tests: real temporary git repos drive `git status --short`, `git diff --unified=0`, file read/open for changed files, and TUI status/diff panels through the shared list-panel primitive. Rows are panel-safe tokens (`modified:src/main.zig`, `hunk:...`, `add:...`) and changed-file open loads the working-tree content into the editor. Adversarial tests: missing/non-repo paths produce visible `git_error:...` rows, status rows are validated before path extraction, and unsafe paths such as `../secret` are rejected. Boundary: read-only git status/diff/navigation only. No staging, committing, checkout, reset, git mutation, background jobs, terminal shell, or external service added.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#25