Skip to content

007 support progress messages - #13

Merged
S2thend merged 7 commits into
mainfrom
007-support-progress-messages
Apr 2, 2026
Merged

S2thend merged 7 commits into
mainfrom
007-support-progress-messages

Conversation

@S2thend

@S2thend S2thend commented Apr 2, 2026

Copy link
Copy Markdown
Owner

cch search misses content in progress-type messages #9

S2thend added 7 commits April 1, 2026 21:45
Create the full Specify artifact set for first-class progress message support in cch.

This commit adds:
- the feature specification for preserving, searching, viewing, filtering, and exporting progress entries
- a clarification recording the dedicated progress filter value for cch view
- the implementation plan with technical context and constitution checks
- research notes covering the current parser gap, message-model impact, and raw payload uncertainty
- a data model for ProgressMessage and related search/filter type changes
- CLI and library API contracts for progress-aware behavior
- a quickstart guide describing implementation order and verification flow
- an executable tasks list organized by user story
- generated Codex agent context in AGENTS.md

The resulting artifact set is ready for implementation work on branch 001-support-progress-messages.
Capture the agreed remediation decisions for the progress-message feature package.

Update the spec to require full fidelity for progress entries across every supported output that surfaces them, including preserved fields, metadata, relationships, and explicit empty/non-readable handling. Add a measurable acceptance target for search, view, and filter operations on 100+ message sessions.

Align the implementation plan with the stronger data-fidelity requirement and the new performance target, including explicit validation expectations for fidelity, empty/non-readable progress content, and acceptance-time performance checks.

Restructure the task plan so each user story includes at least one explicit validation task, add the previously missing coverage for tests/integration/get-session.test.ts, tests/unit/cli/commands/view.test.ts, and tests/unit/cli/formatters/session.test.ts, and make empty/non-readable progress behavior a named test obligation instead of an implicit regression concern.
Rename the progress-message spec package from 001-support-progress-messages to 007-support-progress-messages to resolve the duplicate 001-* numbering conflict in specs/.

Update the feature branch identifier, internal spec/package references, quickstart and contract metadata, task paths, and generated AGENTS.md entries so the renumbered package is self-consistent.

This commit is a bookkeeping renumber only; it does not change feature scope or implementation behavior.
Implement first-class support for top-level session entries with type "progress" so they are preserved in the typed message model, included in session counts and timestamps, searchable through library and CLI search flows, visible in session views, filterable via --only progress, and preserved in JSON and Markdown exports.

This change extends the core library model with a dedicated ProgressMessage type, teaches the parser to normalize readable progress blocks while safely handling empty or non-readable payloads, updates session filtering and search extraction to treat progress as displayable/searchable transcript content, and adds distinct CLI rendering and labeling for progress output. It also adds a reusable progress fixture, publishing ignore rules, README updates, and full regression coverage across unit, integration, and CLI test paths.

Verification:
- npm run typecheck
- npm test
- npm run build
- node dist/cli/index.js --data-path /tmp/cch-progress-verify-run search "PROGRESS_ONLY_TOKEN" --full
- node dist/cli/index.js --data-path /tmp/cch-progress-verify-run view 0 --only progress --full

File summary:
.npmignore: add npm publishing ignore rules for source, specs, tests, local metadata, and build-only package contents.
README.md: document searchable/viewable/exported progress messages and add progress-specific CLI examples.
specs/007-support-progress-messages/tasks.md: mark all implementation and verification tasks complete.
src/cli/commands/view.ts: treat session.messageCount as the displayable total and add progress to --only validation/help text.
src/cli/formatters/search.ts: render PROGRESS as a first-class search result label.
src/cli/formatters/session.ts: render progress transcript blocks with preserved metadata and empty-text placeholders.
src/lib/export.ts: preserve progress messages in Markdown export and include full progress metadata in rendered output.
src/lib/index.ts: re-export the new progress types from the public library surface.
src/lib/parser.ts: normalize raw progress entries into typed messages and count them in metadata extraction.
src/lib/search.ts: include progress content in search extraction and emit progress matches.
src/lib/session.ts: count, timestamp, classify, and filter progress messages as displayable transcript content.
src/lib/types.ts: add ProgressMessage and ProgressContent, widen message/filter/search unions, and expose progress as a valid filter type.
tests/fixtures/progress-session.jsonl: add a reusable progress fixture covering readable and non-readable progress entries.
tests/integration/cli/search.test.ts: verify CLI search returns progress-only matches and labels them as PROGRESS.
tests/integration/cli/view.test.ts: verify transcript rendering, JSON output, progress-only filtering, and empty progress states.
tests/integration/export-sessions.test.ts: verify JSON and Markdown export preserve progress entries and metadata.
tests/integration/get-session.test.ts: verify getSession preserves progress entries, counts, timestamps, and metadata.
tests/integration/search-sessions.test.ts: verify library search finds progress-only matches, ignores unreadable progress blocks, and meets the 100+ message target.
tests/unit/cli/commands/view.test.ts: verify the view command accepts progress as a valid filter type.
tests/unit/cli/formatters/search.test.ts: verify formatted search output labels progress matches correctly.
tests/unit/cli/formatters/session.test.ts: verify formatted sessions render progress blocks and unreadable-progress placeholders.
tests/unit/parser.test.ts: verify progress transformation, safe unreadable handling, and progress-aware metadata parsing.
tests/unit/session.test.ts: verify progress classification, filtering, displayable defaults, and transcript ordering.
Use filtered displayable messages as the default view set so unfiltered cch view no longer counts hidden message types such as summary entries in the Messages header.

Adjust the session header formatter so filtered wording only appears when an actual filter is applied, and add regression coverage for the updated default path and header behavior.
Extract progress text from real Claude session schemas that store readable progress content under nested agent_progress payloads, including data.message and data.normalizedMessages, while preserving the empty placeholder behavior for hook-style progress entries that do not carry human-readable text.

Add focused parser and CLI view coverage for the nested real-data variants so progress rendering is verified against the same schema shape observed in host data.

Run the repository formatter as requested before validation. Because the project format script rewrites all src and test TypeScript files, this commit also includes the resulting repo-wide Prettier normalization changes.

Validation:
- npm run format
- npm run typecheck
- npm test
Advance the package version from 0.5.0 to 0.6.0 for the progress-message feature release.

Also synchronize the npm lockfile root package metadata, which was previously stale at 0.3.1.

No tests were run for this commit because it only updates release metadata.
@S2thend S2thend self-assigned this Apr 2, 2026
@S2thend
S2thend merged commit 6579f11 into main Apr 2, 2026
2 checks passed
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.

1 participant