Simplify comment threads to Resolve/Reopen, drop accept/discard - #209
Open
HamptonMakes wants to merge 6 commits into
Open
Simplify comment threads to Resolve/Reopen, drop accept/discard#209HamptonMakes wants to merge 6 commits into
HamptonMakes wants to merge 6 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3684970053
ℹ️ 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".
Collapses the four-state pending/todo/discarded/resolved lifecycle to just open/resolved. There's no accept/reject mechanics anymore — a thread is either open or resolved, and either the thread's author or the plan's author can flip it either way. Authors can still delete their own comments, unchanged. - CommentThread: STATUSES/OPEN_STATUSES/CLOSED_STATUSES collapse to open/resolved; accept!/discard! replaced by reopen! - Policy: accept?/discard? removed; resolve?/reopen? unchanged - Web + agent API routes: dropped accept/discard, kept resolve/reopen (agent API's discard endpoint removed entirely, not aliased) - UI: single "Resolve (e)" button replaces Accept/Discard; e is the new keyboard shortcut (r stays reply) - Migration collapses existing pending/todo -> open and discarded -> resolved, and updates the column default - Specs, seeds, and docs (AGENTS.md, agent instructions, marketing copy) updated to match the two-state model
CommentThread::CLOSED_STATUSES collapsed to ["resolved"] only, so the mark_closed_thread_notifications_read migration (which queries that live constant) no longer matches legacy "discarded" rows. Split the test so it asserts what actually happens today instead of asserting stale discarded-row behavior.
accept! used to set resolved_by_user_id on todo threads, so migrating them straight to open left stale resolver provenance on a thread that now reads as unresolved — an open thread would show a resolver even though newly created/reopened open threads never have one.
plan.comment_threads.reload.last had no ORDER BY, so its row order was unspecified — it happened to match insertion order on MySQL but not on Postgres, where an unordered scan returned the older resolved thread instead of the newly created one, failing test-postgres in CI.
The create action still computed status: "todo"/"pending" for new threads, which is invalid now that CommentThread::STATUSES is just open/resolved — every agent-API comment creation 422'd. Drop the status assignment and let the model default (open) apply. Only surfaced by running the full suite rather than filtered files. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
HamptonMakes
force-pushed
the
hampton/comment-resolve-delete-494f8c
branch
from
September 4, 2026 19:49
595b54d to
81919cb
Compare
An "open" badge on every thread was noise — open is the default, uninteresting state. Only render the status pill once a thread is resolved. Flip resolved-highlight visibility to match: resolved threads now show as a dashed underline in the doc by default instead of vanishing entirely, matching the product's "history is always browsable" pitch. Pressing s now hides resolved threads for a decluttered read, instead of the reverse. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CommentThreadlifecycle from four states (pending/todo/discarded/resolved, with Accept/Discard/Resolve/Reopen actions) down to two:open⇄resolved. There's no accept/reject mechanics anymore — a thread is either open or resolved.CommentThreadPolicy#resolve?/#reopen?, unchanged logic, just fewer actions).PATCH .../discardendpoint is removed entirely (not aliased to resolve).a)/Discard(d) buttons and shortcuts are replaced by a single Resolve (e) button/shortcut — Gmail-style archive, keepingrfor reply as-is.CommentPolicy#delete?was already scoped to the comment's author and didn't need to change.pending/todo→openanddiscarded→resolved, and updating the column default.Test plan
spec/models/comment_thread_spec.rb,comment_thread_analytics_spec.rb,comment_thread_anchor_spec.rbupdated for the two-state model, including a newreopen!testspec/requests/comment_threads_spec.rb,spec/requests/api/v1/comments_spec.rbupdated — discard endpoint tests removed, added a 404 case for a non-creator/non-plan-author trying to resolvespec/system/comment_ux_spec.rb,spec/system/voice_commenting_spec.rbupdated for the single Resolve button andekeyboard shortcutOPENbadge + single "Resolve (e)" button, resolving clears the anchor highlight, resolved popover showsReopen, clicking it flips the thread back toopen