Repository navigation
fix(mobile): open briefing session links in the briefing's scope - #8268
Conversation
A briefing's session and evidence rows pushed the agent-chat route without the report's organization, so an opened session depended on the selected organization switch that precedes the push and the route had to read the session's metadata back to learn its scope. The rows now build their destination with the same helper the app's other session entry points use, which carries the report organization on the route (personal reports stay unscoped). Evidence rows keep resolving to their session group's root through that helper, so an activity, cost, or blocker row opens the session the Agents section names, and an external-link row still opens its URL. Verified on the Android emulator against the local stack, app in Japanese: with the selected scope on Personal, a session row in an organization briefing opens that session with its transcript, and the route's own unscoped metadata read no longer runs; a personal briefing row still opens its session.
|
bot: Android E2E proof for the briefing session links, app language Japanese, local dev stack, owned fake account and seeded Personal + organization briefings. Exercised: with the selected scope on 個人, opened the organization briefing from ブリーフィング履歴 and tapped the session row 経費精算バッチのタイムゾーン境界を修正 🧾. The session route opens that session and renders its 40-message read-only transcript; |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental change is a type-only refactor that replaces the local briefing aliases with the contract-derived types, so no runtime behavior or link resolution changed. Overview
The previous suggestion is resolved: Verified in the incremental diff: Files Reviewed (2 files)
Previous Review Summary (commit 2b3244a)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 2b3244a)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe navigation change is behavior-preserving and matches the route contract; the only finding is a maintainability suggestion to reuse the shared briefing types instead of duplicating them. Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Verified behaviors: session and evidence rows now build the same Reviewed by deepseek-v4.1-flash-1017 · Input: 39.4K · Output: 3.4K · Cached: 290.8K Review guidance: REVIEW.md from base branch |
The briefing link helpers declared local copies of the report and source shapes. Deriving them from `BriefingReport` and `BriefingSource` keeps the helpers in step with the router output: a contract change now fails the typecheck instead of drifting silently. Behaviour is unchanged.


What changes
A briefing's session rows and its activity/cost/blocker evidence rows now build their agent-chat destination with
getAgentSessionPath, the helper every other session entry point in the app already uses (agentslist rows, share gate, notifications, system search). The row's destination therefore carries the report's organization on the route, and a personal report stays on the unscoped route.Two consequences:
The evidence-row root resolution moved into the same small module (
briefing-session-href.ts), unchanged in behaviour: an activity, cost, or blocker row opens the root session of the group it was recorded under (the session the Agents section names), falling back to the source's own session when the report no longer lists that group, and a pull-request or artifact row still opens its external URL.Verification
Local stack + Android emulator (
omp36), app language Japanese, owned fake account, organization briefing produced bypnpm dev:seed app:agent-briefing <fake-email> --organization-id=<org>(Personal and organization reports, plus a read-only session carrying a 60-message paged fixture).dev/logs/nextjs.logshowscliSessionsV2.getWithRuntimeStateandcliSessionsV2.getSessionMessagesPageafter the tap, and nocliSessionsV2.get— the query the detail route runs only when it has no organization from the route.Session status changed) opened the group's root session with the same transcript.Unit coverage:
apps/mobile/src/components/agent-briefing/briefing-session-href.test.tsasserts the report organization on a named session, the unscoped personal path, root resolution for an evidence row, the fallback to the source session, andnullfor an external-link row.pnpm --filter kilo-app run typecheck,oxlint, andoxfmtare clean on the changed files.Limitation: a live cloud-agent session cannot be created on the work VM (no container/DO runtime), so that session type is exercised only through its organization parameter on the shared route helper.
Proxy answers
The owner's proxy gave these answers in the owner's place.
dev:seed app:agent-briefing --organization-id), tapping a briefing session row opened the session and rendered its transcript; this held with the app scope already the org, and with the app scope on 個人 so the row performs the organization switch first. The exact error screen the explorer saw (このセッションを読み込めませんでした。/ セッションの詳細を読み込めませんでした。 + 再試行) is the session body's transport-error state, which could only be produced by stopping the session-ingest worker; after restarting it, 再試行 opened the same row with its 40-message transcript. The briefing handler'ssetOrganizationId+ push matches the notification/deep-link pattern, and the session route derives the session's own organization from its metadata read. Limitation: a real cloud-agent session cannot be created on this VM (no container/DO runtime), so that session type was untested. How should this work item end?Answer: Ship the navigation hardening instead
Confidence: 0.60 · Precedent: Autonomy: 'If a defect does not reproduce in your environment, ship the reasonable fix and close the task' (an earlier session, owner chose 'Merge fix(mobile): polish quick chat composer edge and session list loading rows #7613 and close this'). Ending as no_change needs proof against the current code, and the cloud-agent path is still untested.
The condition that later answers from the proxy extend or replace this section.