Repository navigation
fix(fe): surface state contract failures - #342
Conversation
Test-First: src/lib/ipc.test.ts::strips both Rust routing prefixes before a message reaches the UI Test-First: src/components/StatisticsView.test.tsx::formats statistics failures through describeError Test-First: src/components/SettingsView.updates.test.tsx::shows a failed updater state write instead of swallowing it Test-First: src/lib/useSharpening.test.ts::reports a failed abandoned-question write after cancellation Co-Authored-By: Codex GPT-5 <47299143+Cuarroc@users.noreply.github.com>
Regression-For: c3d988e Co-Authored-By: Codex GPT-5 <47299143+Cuarroc@users.noreply.github.com>
No-Test: activity journal only Co-Authored-By: Codex GPT-5 <47299143+Cuarroc@users.noreply.github.com>
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: c80f5b65d8
ℹ️ 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".
| .catch((cause: unknown) => { | ||
| if (generation === latestUpdaterViewGeneration) { | ||
| setUpdateState({ phase: "error", message: describeError(cause) }); | ||
| } |
There was a problem hiding this comment.
Verwirf Fehler überholter Updater-Lesevorgänge
Wenn getUpdaterState() erst fehlschlägt, nachdem der Nutzer bereits „Check for updates“ gestartet hat, überschreibt dieser Catch den neueren Zustand mit phase: "error". Der Erfolgszweig schützt genau davor mit !updaterTransitioned.current, der neue Fehlerzweig jedoch nicht; dadurch kann etwa ein bereits gefundener Update samt Installationsschaltfläche wieder verschwinden. Prüfe hier ebenfalls, ob seit Beginn des Lesevorgangs eine Transition stattgefunden hat.
Useful? React with 👍 / 👎.
| .catch((cause: unknown) => { | ||
| if (generation === latestUpdaterViewGeneration) { | ||
| setUpdateState({ phase: "error", message: describeError(cause) }); | ||
| } |
There was a problem hiding this comment.
Ordne Schreibfehler der zugehörigen Updater-Transition zu
Wenn ein älterer setUpdaterState-Aufruf verzögert fehlschlägt, setzt dieser Catch den sichtbaren Zustand auch dann auf Fehler, wenn publishUpdateState inzwischen bereits eine neuere Transition angezeigt hat. Beispielsweise kann das Speichern von installing scheitern, danach ready erfolgreich gespeichert werden und der verspätete Catch dennoch die Neustart-Schaltfläche dauerhaft durch den alten Fehler ersetzen, weil erfolgreiche Persistenz den UI-Zustand nicht erneut setzt. Der Fehlerhandler braucht daher zusätzlich eine Transition-ID beziehungsweise einen Vergleich mit dem aktuell veröffentlichten Zustand.
Useful? React with 👍 / 👎.
| function closeAbandoned(abandoned: Question[], reportError: (cause: unknown) => void): void { | ||
| for (const question of abandoned) { | ||
| void answerQuestion(question.id, CANCEL_ANSWER).catch(() => undefined); | ||
| void answerQuestion(question.id, CANCEL_ANSWER).catch(reportError); | ||
| } |
There was a problem hiding this comment.
Begrenze Abbruchfehler auf die zugehörige Schärfungsrunde
Der neue unawaited Catch ruft reportError ohne Prüfung der Rundennummer auf. Wechselt der Nutzer nach einem Abbruch sofort das Projekt oder startet eine neue Schärfung, kann ein später Fehler beim Schließen der alten Frage setError in der inzwischen aktuellen Oberfläche auslösen und dort fälschlich als Fehler der neuen Runde erscheinen. Erfasse beim Schließen die aktuelle round und veröffentliche den Fehler nur, solange diese Runde beziehungsweise Oberfläche noch aktuell ist.
Useful? React with 👍 / 👎.
|
Queued — the merge queue status continues in this comment ↓. |
Test-First: src/lib/ipc.test.ts::strips only the refused routing prefix and keeps unknown-entity errors readable Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Regression-For: 06fe4c3 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No-Test: test-only change, keeps a red-first trailer name green at head Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 4 seconds in the queue, with no time running CI. ReasonThe pull request conflicts with the base branch HintYou should update or rebase your pull request. If you want to requeue this pull request, you can post a Requeued — the merge queue status continues in this comment ↓. |
No-Test: generated HQ snapshot refreshed by post-merge hook
|
@Mergifyio queue |
No-Test: activity handoff note only
Merge Queue Status
This pull request spent 23 minutes 22 seconds in the queue, with no time running CI. ReasonThe pull request conflicts with the base branch The pull request was held in the queue, conflicting with 1 pull request ahead of it. The conflict became a base branch one after #340 merged. HintYou should update or rebase your pull request. If you want to requeue this pull request, you can post a Requeued — the merge queue status continues in this comment ↓. |
No-Test: generated HQ data only
|
@Mergifyio queue |
No-Test: activity handoff only
Merge Queue Status
This pull request spent 39 minutes 36 seconds in the queue, including 23 minutes 21 seconds running CI. Required conditions to merge
|
Die Konfliktlösung ist abgeschlossen und der Branch enthält den aktuellen Stand von
main.Die generierten HQ-Snapshots wurden nach dem Merge aktualisiert und mitgepusht.
Die vollständige Linux-Prepush-Prüfung ist grün; die Windows-Prüfung bleibt Aufgabe der Merge-Queue.
Report
What changed
origin/mainintocodex/state-7-error-contractto resolve PR fix(fe): surface state contract failures #342's conflict.ortstrategy and produced no textual conflict hunks; the merge commit isd2dcb45.b8713fdafter the merge.d915945.origin/main.Architecture drift
node scripts/ci/architecture-drift.mjs checkexited 0 with no new findings. No allowlist entry was added.Evidence
npm run dev:start-check— exit 0 before the final gate; 11.2 GB RAM free and one Cargo build running.git merge origin/main— exit 0; merge commitd2dcb45.bash scripts/ci/secret-scan.sh— exit 0; no leaks found.bash scripts/ci/gates.sh lane prepush— exit 0 on final HEAD; frontend 480/480, HQ 516/516, Rust 1757/1757 passed, with 7 Rust tests skipped.git push -u origin codex/state-7-error-contract— exit 0; the final push hook also ranprepushsuccessfully.git ls-remote origin refs/heads/codex/state-7-error-contract— exit 0; verified final SHAd915945b656898f9cd9686d2f1646b8ca11187fa.NICHT ABGEDECKT
#[cfg(windows)]tests or Windows clippy arms; the Windows lane runs in the merge queue.prepush.Review disposition
Review: ausstehend (Stufe B).
Open points