Skip to content

fix(web): startup My Work decision runs where a cold start actually lands - #463

Merged
johnnyelwailer merged 1 commit into
mainfrom
fix/startup-mywork-gate-on-team-home
Oct 8, 2026
Merged

johnnyelwailer merged 1 commit into
mainfrom
fix/startup-mywork-gate-on-team-home

Conversation

@johnnyelwailer

Copy link
Copy Markdown
Owner

Opening the app on / never ran the startup gate from #441/#448: the _chat route's beforeLoad bridges / to the Team home (/t3team) before the index route renders. The home applied an older rule instead (open My Work whenever any Jira project exists), so a user with a Jira project but no data — e.g. an expired Jira session — landed on My Work's "Sign in to Jira", and the loading animation never showed.

Fix

  • T3TeamStartupMyWorkGate now wraps the Team home (AppMainContent, no route view, no selected project) instead of the unreachable index route. It uses the shell's backend rather than building its own.
  • useStartupLandingEligible claims the session's one decision on the shell's first mount, and the gate probes at most once per session, so going back home (after Settings, a project dashboard, or leaving My Work) never redirects.
  • A reload on /t3team counts as a cold start, same as /.
  • Removed the dead index-route wrap and opensAllProjectsMyWorkHome.

Verification

  • Live web dev (seeded projects, Jira session not signed in): cold start / → /t3team showed "Loading My Work" for about 100 ms, then the normal home. Before the fix it opened My Work "Sign in to Jira". /settings → back to / stays on the home.
  • vp test run for the gate render test, startup-landing logic, AppMainContent, and My Work cold start: 28/28 passed. Web typecheck is clean, and the additive guard passes.
  • I couldn't drive the "Jira data present → /t3team/my-work" path live without the user's Jira session. The decision logic for it is unchanged and covered by the unit tests.

Claude Opus 5.5 via Claude Code (T3 Code).

🤖 Generated with Claude Code

…ly lands

`/` is bridged to the Team home (/t3team) in the _chat beforeLoad, so the
startup gate from #441/#448 on the index route never mounted. The home used an
older rule instead: open My Work whenever any Jira project exists, data or not.

The gate now wraps the Team home. The shell's first mount claims the session's
one decision, and the gate probes at most once, so returning home never
redirects. A reload on /t3team counts as a cold start. The gate reuses the
shell's backend instead of creating its own. The dead index-route wrap and
the old any-work-project rule are removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T11:45:16.574079Z dae68e6 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dae68e6633

ℹ️ 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".

Comment on lines +152 to +154
<T3TeamStartupMyWorkGate
eligible={startupEligible && selectedProjectId === null && !reopenInitialSetup}
>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Run the cold-start probe before honoring the default selection

On a returning session where t3team:projects is already in localStorage, useProjectStore initializes selectedProjectId to the first stored project, so this condition prevents the new gate from probing at all (or the preceding homeProject branch returns first for a work project). Consequently the advertised cold-start behavior only works while project hydration begins from an empty local cache, while normal returning users still land on the old home/dashboard behavior. Because startupEligible remains cached as true and the gate remains unclaimed, deleting that initially selected work project later in the same mount can also trigger the supposedly cold-start-only redirect. The gate should consume/run the startup decision before applying this synthetic default selection, or distinguish it from an explicit user selection.

AGENTS.md reference: AGENTS.md:L236-L236

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for dae68e6.

This comment will update automatically after the next completed run.

@johnnyelwailer
johnnyelwailer merged commit 6f50ca4 into main Oct 8, 2026
20 of 21 checks passed
@johnnyelwailer
johnnyelwailer deleted the fix/startup-mywork-gate-on-team-home branch October 8, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant