feat(web): show detected phrase tags + export all phrases as one JSON - #79
Conversation
Two playtest fixes (parts of #74, #77): - Per-phrase tags are now visible: the split pager renders each phrase's resolved tags (chosen + notation-derived techniques like slide/hammer_on) as ticked, read-only chips instead of just a count. Read-only on purpose — they reflect the phrase and do not feed the next split. - "all phrases" now downloads a single JSON array (<id>.chunks.json) instead of N separate files; the base id defaults from the capture form (strips _p<N>). Static front-end only; the debuglog test lane stays 8/8.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe split pager UI gains a read-only ChangesSplit pager: per-phrase tag display and bundled download
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fabea9b87
ℹ️ 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".
| const chunks = splitChunks.map((ch) => { | ||
| try { return JSON.parse(ch.chunk); } catch (_) { return { id: ch.id, error: 'unparseable chunk' }; } | ||
| }); | ||
| saveBlob(`${base}.chunks.json`, JSON.stringify(chunks, null, 2)); |
There was a problem hiding this comment.
Keep the all-phrase export manifest-readable
When a curator clicks ⬇ all (one JSON) after splitting phrases and drops the downloaded file into the corpus folder, this now writes a .chunks.json file containing an array, but the documented capture flow still sends these downloads to griff manifest, and cmd_manifest only collects filenames ending in .chunk.json and deserializes each file as a single ChunkMeta (cli/src/main.rs lines 1109-1132). The old all-phrases button produced files that the manifest consumed; this replacement silently leaves every phrase out of the manifest unless another importer is added or the export remains a set/archive of individual .chunk.json records.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — fixed in b0cfbaa. You're right that cmd_manifest collects individual *.chunk.json files (one ChunkMeta each), so the array bundle would be silently skipped.
Rather than regress that path, I kept both, clearly labeled:
- ⬇ each phrase → one
<id>_p<N>.chunk.jsonper phrase (manifest-ready — the previous behavior, restored) - ⬇ all (one JSON) → a single
<id>.chunks.jsonarray (for sharing/review)
The bundle's .chunks.json suffix doesn't match manifest's .chunk.json filter, so it's safely ignored rather than mis-parsed. Teaching griff manifest to also ingest a .chunks.json array is captured as a follow-up on #77. Verified with a headless e2e (13 phrases, tag chips, bundle = 13-element array, no page errors).
Generated by Claude Code
Codex P2 (#79): replacing the per-file "all phrases" export with a single .chunks.json array broke the documented capture -> `griff manifest` flow — cmd_manifest (cli/src/main.rs) ingests individual *.chunk.json files, one ChunkMeta each, and would silently skip the array bundle. Keep both, clearly labeled: - "each phrase" -> one <id>_p<N>.chunk.json per phrase (manifest-ready) - "all (one JSON)" -> a single <id>.chunks.json array (sharing/review) Verified: node --check, debuglog lane 8/8, headless e2e (13 phrases, tags render, bundle is a 13-element array, no page errors).
Two ergonomics fixes from a playground playtest (Dance Gavin Dance GPX). Partially addresses #74 and #77; the rest of the playtest backlog is #73–#78.
What
⬇ all phrasesbutton saved N separate files (staggered); it now downloads a single<id>.chunks.json— a JSON array of every phrase chunk. The base id defaults from the capture form (strips the_p<N>suffix). (web: export all phrases as one JSON; avoid chunk-id collisions across sessions #77)Scope
Static front-end only (
web/static/app.js,index.html,style.css) — no engine/Rust change.Verification
⬇ all (one JSON)produces a single 13-element array. No page errors.node --checkonapp.js; the debug-log unit lane stays 8/8 (web-test).Note
The e2e also surfaced an unrelated UX bug now logged on #73: loading this GPX with the default mode (counter_melody) shows
error: Arrange(NonUniformTimeline)because the song changes meter. Not addressed here.🤖 Generated with Claude Code
https://claude.ai/code/session_01TTUbGjzD8ysnVnCJnZJE95
Generated by Claude Code
Summary by CodeRabbit
New Features
Improvements
.chunks.jsonfile containing an array of all phrase chunks.