Skip to content

feat(web): open My Work at startup when it has items - #441

Merged
johnnyelwailer merged 3 commits into
mainfrom
feature/open-on-my-work-when-data-exists-6a385915
Oct 7, 2026
Merged

johnnyelwailer merged 3 commits into
mainfrom
feature/open-on-my-work-when-data-exists-6a385915

Conversation

@johnnyelwailer

Copy link
Copy Markdown
Owner

Opening the app always dropped you into a draft thread, even when My Work had something waiting for you.

Now a cold start on / opens My Work (replace navigation) when at least one project is bound to Jira and My Work would show at least one item. Otherwise the existing draft-thread / add-project landing is unchanged.

How

  • t3team-startupLanding.logic.ts holds the pure decision (decideStartupLanding, deriveStartupMyWorkProbe), unit-tested. It reuses My Work's own rules rather than a copy:
    • bound projects come from selectBoundProjects, moved out of AllProjectsMyWorkView into t3team-allProjectsMyWorkProjects.ts so the index route doesn't import the whole view;
    • items for the digest lens are buildDigestPlan(graph).sections (the digest's own "Nothing needs you" test); for the hierarchy/board lenses they are the graph's tickets;
    • the lens is resolved with resolveProjectDashboardMyWorkState, the same call My Work uses.
  • T3TeamStartupMyWorkGate wraps IndexDraftLanding. It renders nothing while it decides, so the draft landing never flashes. It mounts useMyWorkDigestGraph({ scope: "all" }) with the same inputs as My Work, so after the redirect My Work paints from the digest cache without fetching again.
  • The wait is capped at 2s. A failed or retrying digest, or an expired Jira session, falls back to the landing immediately, so a slow or broken Jira never blocks startup.
  • It only runs on a cold start: the document must have loaded on the index route (checked via the performance navigation entry, pathname for web, hash for desktop). It decides once per app session. The session is claimed as soon as the decision starts, so a user who clicks away mid-wait, or later returns to / from My Work, is never pushed back to My Work.
  • _chat.index.tsx gets a three-line wrap and is added to the additive-guard whitelist. Sidebar nav ordering is untouched.

Verification

  • vp test run on the new logic tests (9) plus the existing all-projects My Work tests: pass. Covered: no Jira project, Jira project but no items, items present (digest and board lenses), slow load past the deadline, failed/retrying/session-expired digest, ineligible landing, and the once-per-session guard. Cold-start URL detection is also covered for web and desktop.
  • apps/web typecheck: pass. Lint on the changed files: no new warnings (one existing warning in IndexDraftLanding). t3team-additive-guard: pass.
  • Not done: a live browser pass, and a second-provider review (Codex hit its spend cap, Claude its rate limit, Nexplore was cancelled).

🤖 Generated with Claude Code — Claude Opus 5.5 in T3 Code

Phil J and others added 2 commits October 7, 2026 17:08
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 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-07T19:02:22.265600Z 9e272a8 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 7, 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: 9e272a8dc2

ℹ️ 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 +35 to +39
return (
<T3TeamStartupMyWorkGate>
<IndexDraftLanding />
</T3TeamStartupMyWorkGate>
);

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 Mount the startup gate on the reachable startup route

On a cold load of /, this component is never reached: the parent /_chat route calls translateUpstreamPath and throws redirects in _chat.tsx:212-224, while that bridge maps / directly to /t3team in t3team-upstreamRouteBridge.ts:134-136 before child route components mount. Consequently the gate never probes or navigates, so the advertised startup behavior remains unchanged; mount this decision before that redirect or on the /t3team route.

AGENTS.md reference: AGENTS.md:L23-L24

Useful? React with 👍 / 👎.

…rk-when-data-exists-6a385915

# Conflicts:
#	apps/web/src/t3team/t3team-AllProjectsMyWorkView.tsx
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

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

This comment will update automatically after the next completed run.

@johnnyelwailer
johnnyelwailer merged commit 4ddec8a into main Oct 7, 2026
20 of 21 checks passed
johnnyelwailer added a commit that referenced this pull request Oct 8, 2026
…ly lands (#463)

`/` 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: Phil J <philip.jonientz@nexplore.ch>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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