Repository navigation
fix(web): New lead chat opens the new lead instead of sending you home - #986
Merged
Merged
Conversation
New lead chat made the lead and opened it before this app had heard of the thread, so the thread page found no thread there and went home. It now opens it once the thread has arrived (waitForAppState, now shared with the two places that already waited for something the server made: a set-up project and a started thread). If it hasn't arrived in 10 seconds it says the lead was started instead of opening it into the same bounce. On an install with no default agent chosen it refused, although a new thread there runs on the composer's own fallback. It now takes the same agent a new thread would (fallbackNewThreadModelSelection: the composer's entry order, Codex first, its offline fallback while agents load), and no longer the project's stored model pin, which new threads ignore. The project list closes when its lead item is chosen. Also drops an unused import in leadChat.ts.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"New lead chat" (from the project menu or the command palette) made the lead and then landed you back on the home screen. A live check on main found it.
The cause: it opened the new thread before this app had heard of it, and the thread page sends you home for a thread it doesn't know. Now it opens the lead once the thread has arrived. It uses one shared wait (
waitForAppStateinstore.ts), which replaces the two near-copies that already waited for something the server made: a set-up project and a started thread. If the thread hasn't arrived after 10 seconds, it says the lead was started instead of opening it into the same bounce.Two smaller things from the same check:
fallbackNewThreadModelSelection). It also stops using the project's old stored model pin, which new threads ignore.Checks: fmt, lint and typecheck pass. The web unit tests pass (256 files), and so does the full browser suite (111 files, 1,101 tests). Two new browser tests (with and without a default agent) check after every frame that the page lands on the new lead and stays there; both fail without the fix. New unit tests cover the fallback while agents are loading, with Codex off, and with a custom Codex account listed first.