You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Jsonl session storage (#2)
* feat: store reviews as per-session jsonl, expose storage path in UI
- Replace per-file JSON sidecars with one comments.jsonl per review
session (plan file in plan mode, repo root in diff mode), plus
meta.json for per-file approval state.
- Each comment now carries the full file path top-level, so JSONL
records are self-describing.
- Plan and diff web UIs show the storage directory with a copy
button; redliner status reports it too.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: spec for plan edit mode
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* docs: clarify edit-mode banner format
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* docs: implementation plan for edit mode
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* feat: add Edit dataclass and Review edit-content methods
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* chore: drop unused Path import in test_review
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* feat: persist edits to edits.jsonl in session storage
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* feat: add /api/edit-content and /api/clear-edit endpoints
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* feat: add 'redliner edits' command and has_edits to status
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* refactor: hoist edits_path import; use monkeypatch in cli tests
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* feat: add Edit mode toggle and textarea to plan view
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* fix: use raw file content for edit baseline; surface API errors
Server returns the unsplit file content as 'raw' in /api/review so
the JS baseline for hasUnsavedEdits matches files without a trailing
newline. saveEditContent and revertEdit now alert on non-OK responses
instead of silently failing. countDiffLines guards against null diff.
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* fix: emit well-formed unified diff for plan edits
The combination of lineterm="" and splitlines(keepends=True) made
unified_diff produce malformed output where the ---/+++/@@ headers
ran together with the first context line. Use the default lineterm
so each header gets its own newline. Adds a regression test that
asserts the first three lines are the canonical diff headers.
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* docs: sync spec with implementation; pin raw field with a test
The /api/review response includes a 'raw' field that wasn't in the
original spec, added to give the Edit-mode UI an exact baseline.
Documented and locked in by an assertion in test_web.py. Also notes
that the segmented mode toggle is the way to switch back to Comment
mode (no separate header button).
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Assisted-By: Claude Code (noreply@anthropic.com)
* fix: escape \n in countDiffLines so JS gets a backslash-n literal
The Python triple-quoted template string was interpreting '\n' as a
literal newline character, breaking the JS source with a SyntaxError
that aborted the whole render. Plan view rendered only the header.
Signed-off-by: Pedro Silva
Assisted-By: Claude Code
* feat: show 'Saved HH:MM' indicator next to filename
Save used to flash the page with no visible state change unless an
edit transition crossed the badge boundary. Now the header shows the
last-saved local time whenever an edit exists, in both modes, and
flashes green for 1.2s after Save completes.
Signed-off-by: Pedro Silva
Assisted-By: Claude Code
* feat: render edited content in Comment mode when edits exist
Once you've saved edits, Comment mode shows the edited version
(state.edit.content) as the source of truth instead of the original
lines. Lets you do a substantial edit and then drop comments on
specific lines of what you just wrote. Banner reworded to match.
Signed-off-by: Pedro Silva
Assisted-By: Claude Code
* chore: drop edit-mode implementation plan from version control
Workflow artifact, not part of the codebase.
Signed-off-by: Pedro Silva
Assisted-By: Claude Code
* chore: drop edit-mode design spec from version control
Workflow artifact, not part of the codebase.
Signed-off-by: Pedro Silva
Assisted-By: Claude Code
---------
Signed-off-by: Pedro Silva <pedro.figs.silva@gmail.com>
Signed-off-by: Pedro Silva
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>