Repository navigation
fix: show Research Agents before sign-in - #642
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 526710d764
ℹ️ 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".
| } catch (error) { | ||
| if (error?.status !== 401) throw error; | ||
| guest = true; | ||
| const catalog = await API.get(`${API_BASE}/api/v1/agents/marketplace`); |
There was a problem hiding this comment.
Discard stale guest renders after sign-in
If a visitor signs in while this marketplace fetch is pending, the sign-in flow triggers another renderResearchShelf() through loadAgentsNow(), but the older guest invocation can resume afterward and overwrite the authenticated cards with “Sign in to use” buttons and no Remove actions. Because concurrent renders are neither serialized nor checked against the current authentication state, a slow catalog response can leave a signed-in user seeing the guest shelf until another refresh; discard stale results or revalidate auth before applying the fallback.
Useful? React with 👍 / 👎.
Signed-out visitors to My Agents lost the entire Research Agents shelf because its authenticated list returned 401. Fall back to the existing public marketplace catalog on 401 and show research cards with a Sign in to use action. Keep owner-only added-state, removal, workbench, run and report authorization unchanged. Restore shelf visibility on rerender and show a recoverable message for load failures. Bump app.js cache version.
Validation: 50 tests passed, including executing the real shelf renderer for guests, authenticated owners and service failures; node syntax check and git diff --check passed. Browser visual verification and production deployment are not yet performed.