Skip to content

Work plan: S8 curation slice 2 — record state in the inspector - #42

Merged
PhysShell merged 9 commits into
mainfrom
claude/project-work-plan-4
Jun 12, 2026
Merged

Work plan: S8 curation slice 2 — record state in the inspector#42
PhysShell merged 9 commits into
mainfrom
claude/project-work-plan-4

Conversation

@PhysShell

Copy link
Copy Markdown
Owner

One roadmap increment as a red → green → docs TDD cycle (the work-plan continuation after #41).

S8 — curation slice 2: the inspector surfaces the record's current state

  • curation::summarize_record digests a ChunkMeta into UI-level strings — title, prior reviewer decision, tags — in the schema's snake_case wire names, derived via serde so the names cannot drift (ADR-0016: no domain types in the UI).
  • The inspector dock shows the block right under the live curation line; the TUI snapshot test pins it.
  • Startup is best effort: an unreadable --record warns and continues, quit-time persist still fails loudly.
  • The prerequisite for the rename/tag slice: the curator sees what the record already carries before editing it. Remaining: split/merge/rename/tag.

Also adds docs/process-backlog.md with the requested follow-up (a sweep script re-requesting Codex review on PRs it never reviewed). Decision recorded in docs/decisions.log.md; S8 stage doc updated.

https://claude.ai/code/session_01NC6kB92Hn6Gcf9cMHjLt4b


Generated by Claude Code

claude added 3 commits June 11, 2026 22:56
… (S8)

The curator must see the record's title, prior reviewer decision, and
tags before rename/tag can build on them: summarize_record on the
curation seam (schema wire names, UI-level strings only) and a record
block in the inspector dock. References items that do not exist yet,
so the suite fails to compile until the green step.

https://claude.ai/code/session_01NC6kB92Hn6Gcf9cMHjLt4b
summarize_record digests a ChunkMeta into UI-level strings — title,
prior reviewer decision, and tags, all in the schema's snake_case wire
names via serde so they cannot drift — and the inspector shows the
block right under the live curation line. Best-effort at startup: an
unreadable --record warns and continues; quit-time persist still fails
loudly. The prerequisite for the rename/tag curation slice.

https://claude.ai/code/session_01NC6kB92Hn6Gcf9cMHjLt4b

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27fc35c073

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread preview/src/curation.rs
///
/// # Errors
/// [`CurationError::ParseFailed`] when `json` is not a `ChunkMeta` record.
pub fn summarize_record(json: &str) -> Result<RecordSummary, CurationError> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Split the TDD red and green changes

This commit introduces the new public curation API (summarize_record here, plus RecordSummary) in the same commit as the tests that cover it in preview/tests/curation.rs and preview/src/tui.rs. The repo’s AGENTS.md TDD hard rule says never to commit a new pub fn/pub struct implementation together with its covering tests; for this non-trivial S8 curation slice, please split the red tests and green implementation into separate commits so the failing red phase is reviewable.

Useful? React with 👍 / 👎.

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.

The split is in place — the flattened PR diff hides it, but the history has the rule's exact shape:

  • red d34f00e "test: red — the inspector surfaces the loaded record's curation state (S8)" touches only preview/tests/curation.rs (+44) and the tui.rs test module (+21); it references summarize_record/RecordSummary/set_record, which did not exist yet, so the workspace fails to compile at that commit.
  • green 466565c "feat(preview): …" touches only implementation — curation.rs (+45), main.rs (+15), tui.rs non-test code (+28) — and adds zero #[test] items.

No code change needed; happy to reorganize if you see a commit where the two actually mix.


Generated by Claude Code

claude added 2 commits June 11, 2026 23:06
The summarize_record insertion landed above decide_record's existing
doc block, merging the two comments onto the new function and leaving
decide_record undocumented. Noticed in the PR #42 review hunk.

https://claude.ai/code/session_01NC6kB92Hn6Gcf9cMHjLt4b
@PhysShell

Copy link
Copy Markdown
Owner Author

@codex review pls

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fded16ba92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread preview/src/tui.rs Outdated
}
)));

self.push_record_lines(&mut lines, dim);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep transport visible with record summaries

When --record is used on a short terminal, these record lines are inserted before the transport block, so the initial inspector can hide the live play/pause and position state entirely; I checked griff-preview ... --snapshot=80x12 --record=core/tests/fixtures/minimal_chunk.json, and the frame stops at the tags line with no transport/pos visible. That regresses the liveness ordering documented immediately below (and previously tested for the no-record path), because curation users who attach a record now lose the playback state unless they know to scroll; putting the record digest below transport would preserve the existing guarantee while still showing it in the dock.

Useful? React with 👍 / 👎.

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.

Confirmed and fixed in 8f6e56c (red → green): the digest is static — loaded once at startup — so it now sits below the transport block with the other static content, exactly per the PR #38 liveness ordering (clipping eats static tails, never live state). Regression test pins transport visible on an 80×12 terminal with a record attached (the first version of the test asserted on pos, which the header also shows — sharpened to the dock-only line). On very short terminals the digest itself clips first; the PR #41 scroll reaches it. Decision recorded in docs/decisions.log.md.


Generated by Claude Code

claude added 3 commits June 12, 2026 01:50
The record block landed above the transport lines, so on a short
terminal the static digest pushes the live play state out of the dock,
regressing the PR #38 liveness ordering.

https://claude.ai/code/session_01NC6kB92Hn6Gcf9cMHjLt4b
…Codex P2, PR #42)

The digest is static — loaded once at startup — so it belongs with the
static blocks under transport: the PR #38 liveness ordering clips
static tails, never the live play state. A blank separator joins the
block, matching the other static sections.

https://claude.ai/code/session_01NC6kB92Hn6Gcf9cMHjLt4b

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09e32706c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread preview/src/curation.rs
///
/// # Errors
/// [`CurationError::ParseFailed`] when `json` is not a `ChunkMeta` record.
pub fn summarize_record(json: &str) -> Result<RecordSummary, CurationError> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Split the record summary API from its tests

This commit adds new public API (RecordSummary/summarize_record) in the same changeset as the tests that cover it, but /workspace/griff/AGENTS.md makes the TDD workflow mandatory and says: "Never commit new pub fn / pub struct implementation in the same commit as the tests that cover it, for any new functionality." Because this is new functionality rather than a characterization test, the change should be split into the required red test commit and the green implementation commit.

Useful? React with 👍 / 👎.

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.

Same finding as the thread above (#42 (comment)) — the rule is satisfied in the commit history, which the flattened PR diff can't show: red d34f00e (tests only, fails to compile), green 466565c (implementation only, zero #[test] items). The follow-up Codex P2 fix repeated the same shape: red 3c4d8d5, green 8f6e56c. Every TDD PR in this repo will look "mixed" at the changeset level by construction; the reviewable unit is the commit sequence.


Generated by Claude Code

Automated reviewers reading the flattened PR diff repeatedly flag TDD
PRs as mixing tests and implementation (Codex P1 on #42, twice); the
diff shows red and green together by construction. State explicitly
that the reviewable unit is the commit sequence.

https://claude.ai/code/session_01NC6kB92Hn6Gcf9cMHjLt4b
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