chore(flags): retire phoenix-optimistic-edits — inline the optimistic edit path#3714
Conversation
🚀 Preview deployed
|
eadfeac to
fb3413e
Compare
|
Repair: rebased onto New head: Conflicts resolved by union-of-removals. Five files conflicted against the sibling flag retirements that landed on main ( One rebase-induced extra removal worth naming: in Verification
Reviewer note — flag-default/CI exposure (see #3720). Assessed as low risk, but worth watching: every assertion in those specs is a timeout-bounded presence/absence check ( Acceptance criteria re-check against #3667 (the original coder could not read the issue body — GitHub was 503ing; it is readable now): all four AC met — gate/ |
… edit path (#3667) The flag served on@100% in production (optimistic in-place content edits, weight. Rip both and keep only the served-on behavior (ADR 0136). - `useFlag(PHOENIX_OPTIMISTIC_EDITS)` removed from the three call sites (`PanoPostDetail` post.edit + CommentEditComposer, sozluk `DefinitionCard`); each now passes `optimistic` unconditionally instead of spreading it away. - `postEditOptimistic` / `bodyEditOptimistic` drop their `enabled` parameter and the `| undefined` return — the partial is always built. - IaC declaration deleted: the `flags/keys.ts` const + `DECLARED_FLAGS` entry, the `flagship/resources.ts` config/factory/import/re-export, and the `alchemy.run.ts` import + stack wiring. - `optimistic-edits.invariant.test.ts` deleted (it pinned the retired flag's default-off IaC record); the `optimisticEdit` unit test drops its gate cases. - Stale prose reworded in `.patterns/fate-mutations-client.md` and `.glossary/TERMS.md`. Closes #3667
fb3413e to
5207d3c
Compare
|
review-code: PASS @ 5207d3c Fresh verdict at the post-rebase head (ADR 0058 — any earlier verdict is stale). Verified read-only off a per-run ref; the merged tree ( AC (#3667 + ADR 0136)
Check 1 — union-of-removals vs the nine already-retired flagsNo retired flag is resurrected as live wiring: Residual textual mentions do survive, but all are prose/history/fixtures that pre-exist on
Check 3 — cross-reference durability
Check 4 — rebase hygieneThe Check 5 — the #3720 risk, adjudicated with CI evidence: RETIREDThe premise is real: No fixture update is needed. Consistent with the prior pre-rebase observation, now re-confirmed at Check 6 — CI diagnosis42 check runs at head: 40 success, 2 skipped, 0 failure. Skips are correct no-op scopes ( Behavior is byte-for-byte what |
|
review-doc: PASS @ 5207d3c Fresh verdict at the post-rebase head (ADR 0058). Doc surface in this diff:
|
|
review-design: PASS @ 5207d3c Fresh verdict at the post-rebase head (ADR 0058). Dispatched because Rendered-surface delta: none against productionNo JSX structure, no component swap, no CSS/class change, no design-token touch, no route change, no copy change. The Turkish user-facing strings ( The only user-visible property is edit latency, and it is unchanged relative to production: Four-pillars / design-lawNothing in this diff generates or restyles UI, so no pillar surface is engaged — no role-token annotation, component-selection, or per-pillar prohibition applies. Empirical confirmationThe three edit-path e2e specs — which drive these exact surfaces with no flag-override cookie, i.e. the previously-flag-OFF world — all pass at this head (6/6, job Not §CP. |
What
Retires the
phoenix-optimistic-editsflag. It served on@100% in production (optimistic in-place content edits, #1675, epic #1637, released), so theuseFlaggate and its flag-off fallback were dead weight. This rips both and keeps only the served-on behavior, then deletes the flag's IaC declaration (ADR 0136).Changes
useFlag(PHOENIX_OPTIMISTIC_EDITS, false)removed from the three call sites —apps/web/src/pages/PanoPostDetail.tsx(post.edit+CommentEditComposer) andapps/web/src/components/sozluk/DefinitionCard.tsx. Each now passesoptimisticunconditionally instead of the...(optimistic ? {optimistic} : {})spread-away.postEditOptimistic/bodyEditOptimisticinapps/web/src/fate/optimisticEdit.tsdrop theirenabledparameter and the| undefinedreturn — the partial is always built.apps/web/src/flags/keys.tsconst + itsDECLARED_FLAGSentry; theOPTIMISTIC_EDITS_FLAGconfig,optimisticEditsFlagfactory, import and re-export inapps/web/worker/features/flagship/resources.ts; the import + stack wiring inapps/web/alchemy.run.ts.apps/web/worker/features/flagship/optimistic-edits.invariant.test.tspinned the retired flag's default-off IaC record, so it goes with the declaration.apps/web/src/fate/optimisticEdit.test.tsdrops its two flag-gate cases and keeps the payload-shape coverage..patterns/fate-mutations-client.mdand.glossary/TERMS.md.No Sentry/flag-tag fixture was repointed — none referenced this flag, so no retirement-set flag was touched.
Verification
git grepconfirms zero surviving references to the flag string/const/factory in tracked source.pnpm typecheck— 33/33 tasks pass.pnpm lint(biome) — clean over the 8 changed files.pnpm vitest run --project unit src/flags worker/features/flagship— 40 files, 202 tests pass, including every sibling*.invariant.test.ts.optimisticEdit.test.ts— 3/3 pass.Closes #3667