Repository navigation
fix: #14337 (rebased onto main, draft) - #16194
christian-byrne wants to merge 0 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. 📝 WalkthroughWalkthroughChangesThe PR replaces independent workflow storage flags with explicit transition states. Cloud logout now clears storage while writes remain fenced until user and team-workspace readiness. Workspace transition cancellation uses an owner-scoped callback. Workflow storage transitions
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The current changes do not introduce a concrete correctness, security, availability, or deployment risk and are merge-ready after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant AuthActions
participant WorkflowPersistence
participant StorageIO
participant TeamWorkspaceStore
AuthActions->>WorkflowPersistence: authenticate logout
WorkflowPersistence->>StorageIO: prepareWorkflowLogoutTransition
WorkflowPersistence->>StorageIO: clearAllWorkflowStorage
WorkflowPersistence->>TeamWorkspaceStore: wait for workspace readiness
TeamWorkspaceStore-->>WorkflowPersistence: active workspace ready
WorkflowPersistence->>StorageIO: completeWorkflowLogoutTransition
Possibly related PRs
Suggested labels: Suggested reviewers: Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation The changes implement the objectives in Full details: End-To-End Regression Coverage For FixesExplanation The commit subject “fix: model workflow storage transitions explicitly” uses bug-fix language. The PR changes application files under Full details: Website End-To-End Regression CoverageExplanation No changed file is under Full details: Adr Compliance For Entity/Litegraph ChangesExplanation PASS. The changed-file list contains only authentication, workflow persistence, and workspace-auth files. No files under
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
christian-byrne
left a comment
There was a problem hiding this comment.
issue: GitHub reports this PR as DIRTY, so the proposed workflow-persistence change is not yet reviewable as an integrable result.
Full context
Please resolve the branch against current main and rerun the auth, workflow-persistence, and browser suites at the resolved head. The transition-owner logic is only meaningful once current callers and the conflict resolution are tested together, including cloud logout, workspace switch, reload, revoked-workspace handling, and stale cleanup closures.
dante01yoon
left a comment
There was a problem hiding this comment.
Requesting changes: this branch was never rebased onto main, and its entire payload is already merged. I think it should be closed rather than fixed, but flagging rather than acting since it is your draft.
The fix is already on main
#14337 ("fix: model workflow storage transitions explicitly") merged to main on 2026-08-22T23:55:47Z as cb66aee9f7, and that commit is an ancestor of main today (cb66aee...main = ahead 227, behind 0) — it was not reverted. main currently exports the whole transition API from storageIO.ts:
prepareWorkflowWorkspaceTransition()(line 488)prepareWorkflowLogoutTransition()(line 517)completeWorkflowLogoutTransition()(line 528)clearAllWorkflowStorage()with theblockWritesoption removed (line 541)
and useAuthActions.ts on main already calls prepareWorkflowLogoutTransition(); clearAllWorkflowStorage().
I diffed this head against main file by file. storageIO.ts — the actual subject of the PR — is byte-identical to main (0 lines of difference).
The title is inaccurate
The merge base of this PR is 795292d907 (2026-08-22T21:17:32Z), which is one commit before cb66aee9f7. So the branch was cut just ahead of its own fix landing and is ahead=1, behind=228. gh pr diff therefore renders the change against a stale base and looks like new work; against main it is a re-application. "rebased onto main" is not what happened.
Merging it would revert nine days of unrelated work
This is why I am blocking rather than just noting it. The three other files are 228 commits behind, so merging this head would undo, in main → this-head direction:
useAuthActions.ts— dropswatchForTopupBalanceUpdate,usePendingTopup, and the entirePOPUP_PERMISSION_ERROR_CODESbranch from #14944 ("warn instead of erroring on blocked or cancelled sign-in popups"), plus the top-up balance refresh from #14876 /f71da5b09.workspaceAuthStore.ts— drops the unified-auth telemetry (#16007-erauseTelemetry/UnifiedAuthRefreshOutcome) and, worse, the whole bounded-backoff re-arm for the proactive unified refresh (1677fc06b, FE-1595). That code's own comment states the consequence of its absence: "cookie-authenticated<img>/media loads have no 401-retry path of their own and stay broken once the session cookie expires".useWorkflowPersistenceV2.ts— reverts the fence-release fix, replacingisWorkspaceInitConcluded(readyorerror) withisWorkspaceReady(readyonly).main's comment says exactly why that regressed: "Waiting on 'ready' alone would leave writes blocked for the rest of the session if init settles on 'error'". It also re-addsworkflowName: nullarguments thatd22005cb8removed with the V1 persistence fallbacks.
What I would do
Close this PR. If there is residual work you wanted from that branch beyond what #14337 landed, an actual git rebase origin/main will show it — and based on storageIO.ts being identical, I expect the rebase to come out empty.
If I have misread the intent and this is deliberately reverting something, could you say which of the three files' current main state you mean to change, and why? Right now the diff reads as an accident of a stale base rather than a decision.
Validation: compared main against head 01facd45e2 per file; resolved the #14337 merge commit and its ancestry; listed the post-cb66aee commits touching each of the four source files. No tests run — the finding is about branch state, not behavior.
| await authStore.logout() | ||
| if (isCloud) clearAllWorkflowStorage({ blockWrites: true }) | ||
| if (isCloud) { | ||
| prepareWorkflowLogoutTransition() |
There was a problem hiding this comment.
issue: these two lines are already on main verbatim (useAuthActions.ts:138-139), landed by #14337 in cb66aee9f7 on 2026-08-22. The diff only looks like a change because this branch's merge base (795292d907) is one commit older than that merge.
The blocking part is not the redundancy, it is what else this file carries at this revision. Merging this head would remove from useAuthActions.ts:
- the
POPUP_PERMISSION_ERROR_CODESbranch and itsst(...)toast (fix: warn instead of erroring on blocked or cancelled sign-in popups #14944), so a user-cancelled or browser-blocked sign-in popup goes back to surfacing as an error - the
watchForTopupBalanceUpdateandusePendingTopupimports and their call sites (fix(billing): refresh credits after checkout without telemetry consent #14876,f71da5b09)
Same pattern in workspaceAuthStore.ts (loses the FE-1595 unified-refresh backoff re-arm) and useWorkflowPersistenceV2.ts (loses the ready-or-error fence release).
Could you confirm this branch is just stale and close it? A real rebase onto main should reduce this file to no change at all.
01facd4 to
69d5d3c
Compare
Draft: fix #14337, rebased onto main.
Full context for agent readers
Rebase of the earlier fix branch onto current main so it is mergeable independently of the CRDT train.