Skip to content

feat(plan-eng-review): flag optimistic-UI on a server-gated action as a code-quality check#1874

Open
timlinnet wants to merge 1 commit into
garrytan:mainfrom
timlinnet:add-server-gated-ui-failure-mode
Open

feat(plan-eng-review): flag optimistic-UI on a server-gated action as a code-quality check#1874
timlinnet wants to merge 1 commit into
garrytan:mainfrom
timlinnet:add-server-gated-ui-failure-mode

Conversation

@timlinnet
Copy link
Copy Markdown

What — One bullet added to eng-review's Code quality review checklist: for an action whose real effect is gated/actuated server-side (auth, permission, validation), check that the client awaits and surfaces the real result instead of optimistically assuming success.

Why — Hit this on a live bug: an approval action was wired to the user who clicked it, but only an admin could grant it. The UI optimistically marked it done and showed a success toast while the server returned 403 — green check, nothing granted, no admin ever notified. eng-review slid past it because it fails closed (dodges the security lens) and looks like success (dodges the failure-mode lens). The catalog already has general "silent failure / swallowed error" framing in the adversarial /ship pass, but not this specific, common client↔server variant.

Change — One bullet. Edited the source template (plan-eng-review/sections/review-sections.md.tmpl) and regenerated the committed section doc via bun run gen:skill-docs so .md and .tmpl stay in sync. No version bump — left to your release flow. Template/section/validation tests pass locally: template-context-parity, section-manifest-consistency, skill-validation, skill-size-budget, parity-sectioned (389 pass).

… a code-quality check

Adds one Code-quality-review bullet: for an action whose real effect is gated or
actuated server-side (auth/permission/validation), check that the client awaits and
surfaces the real result rather than optimistically assuming success. Optimistic
status + a swallowed rejection renders as a false success — a green check while the
server quietly rejected and nothing happened.

The catalog already has general "silent failure / swallowed error" framing in the
adversarial /ship pass; this names the specific, common client↔server variant so an
eng-review reviewer checks the effect landed, not the toast. Source edited in the
section template; generated section doc regenerated via `bun run gen:skill-docs`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Jun 5, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants