Repository navigation
feat: edit descriptions, comments, and reviews where GitHub permits - #43
Conversation
Adds GraphQL viewerCanUpdate to every comment, review, and review- thread selection and carries per-entry EditTargets (node id, kind, raw body) through the activity pipeline. Editing is offered exactly where the server allows it: inline [edit] rows on the description and on editable activity entries, plus an Edit action in the actions menu backed by a keyboard-complete picker modal. The composer opens prefilled, submits updateIssue/updatePullRequest/updateIssueComment/ updatePullRequestReview/updatePullRequestReviewComment, and reuses the existing background pipeline, tab-scoped drafts, and posting freeze. Review edits start from the raw review body rather than the displayed state-prefixed text.
Description edits may now submit an empty body (GitHub accepts it), while comments and reviews keep the friendly empty guard. The edit picker windows its choices around the selection when the terminal is shorter than the list, keeps every drawn row clickable, and shows a selected/total position hint.
The posting freeze and success-close now require the composer's edit target to match the pending action, so an identical draft for a different object is never frozen or discarded. Wheel input no longer scrolls the resource behind the edit picker.
Covers picker navigation guards, digit-hint boundaries, selection highlighting, out-of-range choice selection, the commit-comment paging query contents, and the comment-vs-description composer title.
Final reportMerged as ReviewThree Codex rounds ( Validation
|
Summary
ghzinga could post comments and merge or close, but fixing a typo in your own comment still meant opening the browser.
This change adds editing for everything GitHub lets the viewer edit: the issue/PR description, your own comments and reviews, and anything you can edit as a repo maintainer.
The edit button appears exactly where GitHub would allow it, because visibility is driven by the server's own
viewerCanUpdateflag on each object rather than any local guess.Edits open in the existing in-app composer, prefilled with the current text, and save through the same background pipeline with a refresh afterwards.
What Changed
Editing rides the action pipeline shipped in #42; the new work is permission plumbing, edit targets, and entry points.
viewerCanUpdate. Activity builders attach anEditTarget(GraphQL node id, edit kind, raw current body) to entries the viewer may edit; review targets carry the raw review body, not theAPPROVED: …display text. The unauthenticated REST fallback stays read-only.updateIssue,updatePullRequest,updateIssueComment,updatePullRequestReview, andupdatePullRequestReviewCommentselected by edit kind.[edit]rows under the description header and on each editable activity entry (Overview and Activity tabs), styled like the existing[details]links.A) gains anEditrow (e) that opens an "Edit what?" picker listing the description plus editable entries with author/snippet labels; arrows, digits, Enter, or clicks select.[save ctrl+s]button; drafts stay tab-scoped, are frozen while saving, and survive failures. The edit target is snapshotted per tab alongside the draft.Testing
All local gates pass; the flows are covered end to end by reducer, adapter, fetch-pipeline, and render tests.
cargo fmt --check,cargo check --all-targets,cargo clippy --all-targets --all-features -- -D warningscargo test: 679 tests pass (~30 new: permission-gated target building, raw-vs-display review bodies, picker keys with modified-key guards, prefilled submission, inline row clicks, edit success/failure pipeline behavior, modal rendering)cargo llvm-cov --fail-under-lines 85: 86.84% linesslophammer-rs check .anddry .: clean;cargo audit: clean[edit]rows appear); manifests re-stampedcargo mutants --in-diffrun in progress locally; the PR CI gate runs the same checkRisks
The server remains the final authority, so the worst permission mistake is an error message, not a wrong edit.
updateCommitCommentwas left out of scope); their entries simply show no edit affordance.