Repository navigation
Commit cee8317
committed
fix(cockpit): bind curation action to its chunk + rollback on persist fail (PR #100 review)
CodeRabbit review of the Slice 6 inspector:
- bind each pending CurationAction to the chunk id it was rendered for, so a
same-frame row click can't redirect the edit to the newly-selected chunk
(apply_curation takes an explicit id now, not self.selected).
- roll the in-memory edit back when persist_chunk fails (the native fs::write
path), so the dock never shows a change that didn't reach disk.
- mark undecided chunks (reviewer None) with "?" like an explicit NeedsReview.
Skipped the hash-in-filename suggestion: the corpus is the readable, CLI-byte-
compatible chunk.json tree (ADR-0027 section 3), so hex-encoding the id would
break that convention; ids are unique slugs in the normal flow and the chunk's
internal id stays authoritative. Per the maintainer, the optimistic OPFS "saved"
(matching capture's fire-and-forget) and the single-commit layout stand (as #99).
cockpit 23 tests pass; native + wasm clippy clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTUbGjzD8ysnVnCJnZJE951 parent 91aa38e commit cee8317
1 file changed
Lines changed: 33 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
235 | | - | |
| 234 | + | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
670 | 673 | | |
671 | | - | |
| 674 | + | |
672 | 675 | | |
673 | 676 | | |
674 | | - | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
675 | 687 | | |
676 | 688 | | |
677 | 689 | | |
| |||
683 | 695 | | |
684 | 696 | | |
685 | 697 | | |
686 | | - | |
| 698 | + | |
687 | 699 | | |
688 | 700 | | |
689 | 701 | | |
| |||
732 | 744 | | |
733 | 745 | | |
734 | 746 | | |
735 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
736 | 754 | | |
737 | 755 | | |
738 | 756 | | |
| |||
749 | 767 | | |
750 | 768 | | |
751 | 769 | | |
752 | | - | |
753 | | - | |
| 770 | + | |
| 771 | + | |
754 | 772 | | |
755 | 773 | | |
756 | 774 | | |
| |||
0 commit comments