feat(F155): ship Phase A scene-based guidance engine#398
feat(F155): ship Phase A scene-based guidance engine#398mindfn wants to merge 82 commits intozts212653:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c76820d23f
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1de16718b
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86fde01072
ℹ️ 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".
packages/api/src/domains/cats/services/agents/routing/route-serial.ts
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ed4a7ef1c
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99adfb7567
ℹ️ 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".
packages/api/src/domains/cats/services/agents/routing/route-serial.ts
Outdated
Show resolved
Hide resolved
packages/api/src/domains/cats/services/agents/routing/route-parallel.ts
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99d42baa73
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 649f6ebdc1
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3e6d5a2cc
ℹ️ 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".
packages/api/src/domains/cats/services/agents/routing/route-serial.ts
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1b9d1ca5a
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 394a5b26aa
ℹ️ 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".
packages/api/src/domains/cats/services/agents/routing/route-serial.ts
Outdated
Show resolved
Hide resolved
packages/api/src/domains/cats/services/agents/routing/route-parallel.ts
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3b94823d2
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d08ca9125c
ℹ️ 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".
packages/api/src/domains/cats/services/agents/routing/route-parallel.ts
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9971d85c0
ℹ️ 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".
packages/api/src/domains/cats/services/agents/routing/route-parallel.ts
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45b8ec9364
ℹ️ 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".
packages/api/src/domains/cats/services/agents/routing/route-serial.ts
Outdated
Show resolved
Hide resolved
packages/api/src/domains/cats/services/agents/routing/route-serial.ts
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ea554dce4
ℹ️ 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".
Default thread was treated as globally writable, allowing any authenticated user to enumerate/mutate other users' session-chain records and guide state. Now session-chain routes filter by session.userId, guide-action routes verify guideState.userId, and new guide states carry owner identity from creation. Closes Codex review zts212653#16 findings (P1 session-chain, P2 guide-action). Co-Authored-By: 砚砚/GPT-5.4 <noreply@openai.com> [宪宪/Opus-46🐾]
…store-thread - useSocket: subscribe reactively to store currentThreadId so pending guide_start replays fire when store thread catches up (not only route) - useGuideEngine: block completion dismiss until backend confirms via markCompletionPersisted(), retry up to 3 attempts - GuideOverlay: disable "太好了!" button until completionPersisted - guideStore: add completionPersisted flag + markCompletionPersisted action Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fa80b51 to
477bda2
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 477bda23f1
ℹ️ 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".
| const isActiveThread = Boolean( | ||
| data.threadId && routeThread && storeThread && data.threadId === routeThread && data.threadId === storeThread, | ||
| ); | ||
| if (!isActiveThread) return; |
There was a problem hiding this comment.
Drop queued guide starts when completion arrives off-thread
When a guide_start event is received for an inactive thread, it is buffered in pendingGuideStartsRef; however, this guide_complete path returns immediately for inactive threads and never clears that buffered start. If the user later switches to that thread, the replay effect will fire onGuideStart and relaunch a guide that has already ended. This creates stale overlays and inconsistent guide state across tabs/threads.
Useful? React with 👍 / 👎.
| if (!response.ok) { | ||
| console.error('[GuideOverlay] Failed to persist guide cancellation:', response.status); | ||
| return; |
There was a problem hiding this comment.
Exit guide locally even when cancel request fails
The exit handler returns early on cancel API failure, so exitGuide() is never called when /api/guide-actions/cancel is down or transiently failing. Because the overlay disables Escape and blocks most page interaction, users can get stuck in guide mode during backend/network issues. The UI should still allow local exit (with error reporting/retry) instead of hard-blocking dismissal.
Useful? React with 👍 / 👎.
Summary
Eschub close while a guide is activeMain Changes
Verification
node --test packages/api/test/guide-action-routes.test.jspnpm --filter @cat-cafe/web exec vitest run src/components/__tests__/GuideOverlay.test.ts src/components/__tests__/GuideOverlay.auto-advance.test.tsxpnpm check:featurespnpm check:guidespnpm check:env-ports && pnpm check:env-registry && pnpm check:env-example && pnpm check:start-profile-isolationCloses #409