Repository navigation
fix: show reviewers why an action was refused and stop setup editors overwriting each other - #164
Merged
Merged
Conversation
…ws them
Next redacts the message of an error thrown from a server action in a
production build, so gate refusals reached the reviewer as a generic error.
The actions in actions.ts, brandVoiceActions.ts and saveTemplateConfigAction
now answer { ok: true, ... } | { ok: false, error }; the editors rethrow the
message in the browser. Also narrows article reads in actions.ts to the
fields they use, refuses resetting an article that is still at researched,
and purges the public page when a published article is archived or
unarchived.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… ask first - findPublishedArticle and the home list skip archived articles. - Approve & publish, Publish now and Revisit brief use the armed confirm. - The published panel's Archive says it takes the piece off the site. - revisitBriefAction only runs from needs_revision/needs_review/blocked, refuses during an active run, and clears the schedule, revision notes, QA results and information-gain decision. - saveBriefAction refuses when someone saved the brief since it was opened. - 'board' wording becomes 'content list' in the review panels. - Template tabs/list and the brand voice confirms are accessible: aria state on the current item, focus moves with the confirm buttons. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… the real database Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…xactly `attempt()` now logs a failure that is not a gate's own refusal, since Next no longer logs an error the action did not throw. The brief save refuses any version but the stored one, not only an older one. The revisit audit row records what it clears, and the refusal tests assert the real messages for brand-voice delete and template save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches the editor's limit and the completeness rule. Validation only: payload-types.ts and the database are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… page the source queue - useDirtyGuard: onError for a rejected save, submit() returns the in-flight save, leave dialog disabled while saving - editors: transitions show a rejected server action instead of reaching the error boundary - ICP: step carried in ?step=, activation toast, activation error carried across the first-save remount - workspace: fetch site pages disabled while dirty, success names the domain - source review: pending, approved and dismissed queried separately with totals - tenantActions/suggestionActions: updatedAt checks on whole-document saves; demo workspace audit rows name the operator - accessibility: pressed tabs, aria-current step, TextRows names, fieldset for cleared surfaces Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…source queue and accessible names Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Save-and-activate writes the content before the activation gate can refuse it, which moved `updatedAt` while the editor kept the old version, so the next Save was refused as stale against the editor's own write. The failure result now carries the stored content and version and the editor adopts them. Version checks compare for equality, the activation failure travels as a flag rather than free text in the URL, and `persist` uses the version the guard passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…waits for sign-in - latestRunAction prefers the running run, then the oldest queued, then the newest settled one, and reports every active run id; the bar says how many more are queued and refreshes when any tracked run settles. - Activity totals come from the loadReportCosts aggregate instead of the newest 500 cost-log rows; only the newest row is read for the last call. - RuntimeBanner checks when a user is signed in, keyed on their id. - "board" becomes "content list" in the user-facing strings; the article reads in boardActions pass select. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…itative rule pipeline:report now has an evidenceCheck pass rate (overall and per template) and a failure-digest line, and decides qualitativeReview with decideQualitative so a review that quoted a not-trait breach no longer counts as a pass. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… readably - The reports page adds an evidence-check pass-rate row and names it in failure details, which now come from qaFailures and CHECK_LABEL instead of raw keys and violation codes. - Cost-log stages use the run bar's CALL_LABELS table; the stages it lacked (brandVoiceExtract, setupAssist, topicRelevance) gain labels. - Archived pieces drop out of the waiting and review-queue lists; spend totals and the status mix are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The bar now follows the executing run, so an announcement for a run queued behind it marked the running one stale and showed "Queued — waiting to start" for up to 20 seconds. An announcement is met once its run is among the active ones. The CMS report also counts the qualitative check by QA's own rule (a quoted not-trait breach fails it), and two comments now match the code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The brand-voice save now answers a refusal as a value, so the suggestion was marked accepted with the word never written. Pass the refusal on and leave the suggestion open. A bank that was never saved has no version, so a first save landing between the read and the write went unnoticed; treat "never saved" as a version of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… save-and-activate; report skips archived - The workspace profile save refuses to overwrite a profile saved after the form was opened, like the other setup editors. - The leave dialog keeps its buttons off while an asset editor's own write (save and activate) is running. - The CLI report leaves archived articles out of the review queue and the failure digest, matching the reports panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis 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. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
In production, Next hides the message of an error thrown from a server action, so reviewers saw a generic failure instead of "this brief changed since you opened it". Setup editors could also silently overwrite a colleague's save, and the run bar sometimes showed the wrong run. This PR addresses the open audit findings for the review page, the setup editors, the run bar and the reports.
Review page. Expected refusals come back as
{ ok: false, error }so the real reason reaches the reviewer; unexpected failures are logged. Archived articles leave the public site. Publish and "revisit brief" ask for confirmation first. Revisit is limited to review statuses, refused during an active run, and clears the schedule, notes, QA and scoring. Reset refusesresearched. A brief save refuses a stale version.Setup editors (ICP, positioning, evidence bank, workspace, source review):
?step=. A refused activation keeps the stored version, so the next save is not wrongly refused as stale.Run bar and reports. The bar follows the executing run, counts runs queued behind it, and takes totals from SQL. Both reports count the evidence check, label every cost stage, apply QA's qualitative rule, and leave archived pieces out of their waiting lists.
Proof: typecheck and lint clean; pipeline 887/887; CMS integration 960/960 after rebasing on
main. Each fix has a test that failed before it.Reviewed with sol-loop: 2 rounds with GPT-6.1 Sol. Sol verdict: approved
Created with Claude Opus 5.5 (implementer subagents Claude Sonnet 5.5) in Claude Code.
🤖 Generated with Claude Code