← Back to Pull requests

fix(scouts): PR links open the PR, the tab comes back to the open scout, a scout's chat opens at once #2946

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Dec 03, 2026 21:53 UTC
Author

Why

Four problems in the Scouts tab, all in the same flow:

1. A PR link or PR chip in a scout's chat did nothing when clicked.
2. Leaving the Scouts tab and coming back showed the chats home, not the scout you had open.
3. A chat a scout started (Activity > Now) opened titled "New chat" with a blank pane for up to a minute.
4. Below 768 px the Scouts list covered the scout or chat you opened, and nothing closed it.

What changed

  • PR links open the PR in its project. A PR link or chip in a scout chat opens that PR's project (open, not open, or on another machine) on its PRs tab with the PR selected, and falls back to GitHub when there is no copy. chatPrProjectOpen.ts.

  • The Scouts tab remembers where it was. A plain /bots entry from another tab reopens the scout or chat that was open, at its scroll position. An explicit link wins, a deleted scout shows the plain page, and a sign-out or account change forgets it (account-owned cache). botsTabMemory.ts.

  • A scout's chat opens at once. The old route went to the project-less chats page, which cannot see a project's chats: it retried "not found" for up to 60 s. CTO scouts' chats now open at /bots/<id>/chat/<session> and read through the CTO's project copy on its home (the runtime the scout runs in, already warm), seeded with the summary the Activity list already read. BotChildChatPage.tsx, botChildChats.ts.

  • A header that matches the scout page. A centred pill reads "<title> in <project>", with Back to the scout on the left and Open in Work on the right. Open in Work brings that same project copy (local or remote, by its pin) to the front with the chat open.

  • Narrow windows. Opening a scout or a scout's chat closes the overlaid list, and the list can be brought back.
  • Evidence

    Scout chat: a PR link opens that PR on its project's PRs tab; one with no copy opens on GitHub<!-- ade-proof:5f809d55-2451-49c7-b94a-5b0ab2af0aa4 -->

    Scouts tab: leave for a project and come back, the same scout opens where the chat was scrolled<!-- ade-proof:5deaad2e-930b-4cda-bb47-9ab910375904 -->

    A scout's chat opens in the Scouts tab with its title, Back returns to the scout, Open in Work opens it in the project<!-- ade-proof:43be53df-21a6-45c4-aa38-6748e963ee60 -->

    !Scout chat bar, wide window<!-- ade-proof:4a040078-d50b-40e2-8fc0-aa8932354090 -->

    !Scout chat bar, narrow window (800 px)<!-- ade-proof:3bc1d44d-9f9d-4171-94c3-0dc17ee3d282 -->

    !Scout page header (top) beside the chat bar (bottom), dark<!-- ade-proof:55b75872-3b30-4637-8e47-71134de87d96 -->

    !Scout page header (top) beside the chat bar (bottom), light, long title truncated<!-- ade-proof:76944b91-f099-4fca-b40c-5bb64e5b87c4 -->

  • Time to first draw of a scout's chat: before, up to ~60 s blank ("not found" retries); after, immediate from the seeded summary. The project-scope summary read answers in ~0.18 s through the CLI.

  • Desktop typecheck passes. /quality and /test results follow.
  • Not checked

  • iPhone: the Now rows are plain labels with no tap action (BotScreen.swift), so the iPhone never opens these chats; left as is by decision.
  • 🤖 Generated with Claude Code

    <!-- ade:link v=1 type=pr repo=arul28/ADE branch=daex%2Fpr-links-in-scout-chats-open-the-pr num=2946 -->
    <p>
    <img src="https://ade-app.dev/icon-flat.png" height="18" align="left" alt="DAEX">
    &nbsp;&nbsp;<strong>Open in DAEX</strong>
    &nbsp;·&nbsp; <a href="https://ade-app.dev/open?type=branch&amp;repo=arul28%2FADE&amp;branch=daex%2Fpr-links-in-scout-chats-open-the-pr&amp;pr=2946">daex/pr-links-in-scout-chats-open-the-pr branch</a>
    &nbsp;·&nbsp; <a href="https://ade-app.dev/open?type=pr&amp;repo=arul28%2FADE&amp;number=2946">PR #2946</a>
    </p>
    <!-- /ade:link -->

    <!-- greptile_comment -->

    <!-- greptile_summary -->

    <h2>Confidence Score: 3/5<a href="https://app.greptile.com/api/retrigger?id=129226624&amp;sig=db07020db8648a2439f8cecddf7a67b16f0c915be31bb09eac3e5c47989c2d76"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/-/switch-tenant?tenant=versic&amp;next=%2Farul28%2Fdaex%2Fpull%2F2946&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a></h2>

    <!-- greptile-risk -->

    Fix the hidden child-chat browser and the narrow-window list before merging.

    <h2>Findings<a href="https://app.greptile.com/ide/claude-code?prompt=%23%23%23%20Issue%201%0Aapps%2Fdesktop%2Fsrc%2Frenderer%2Fcomponents%2Fbots%2FBotChildChatPage.tsx%3A153-157%0AThe%20new%20page%20hides%20the%20browser%20but%20does%20not%20enable%20the%20Scouts%20link%20behavior.%20Its%20%60presentation%60%20has%20no%20%60profile%60%2C%20so%20%60ChipPrOpensInProjectContext%60%20stays%20false.%20A%20normal%20Markdown%20web%20link%20reaches%20%60PersonalChatsPage%60's%20browser%20listener%2C%20which%20consumes%20the%20click%20and%20sets%20%60toolPanel%60.%20That%20panel%20is%20not%20rendered%20while%20%60content%60%20shows%20this%20page%2C%20so%20nothing%20visibly%20opens.%20Pass%20the%20page's%20link%20destination%20explicitly%20instead%20of%20tying%20it%20only%20to%20%60persistent_identity%60.%0A%0A%23%23%23%20Issue%202%0Aapps%2Fdesktop%2Fsrc%2Frenderer%2Fcomponents%2Fbots%2FBotsPage.tsx%3A150-153%0ABelow%20768%20px%2C%20the%20list%20still%20covers%20opened%20scout%20content.%20%60mobileListOpen%60%20starts%20true%20and%20closes%20only%20through%20%60selectSession%60.%20The%20new%20%60botChat%60%20route%20supplies%20%60content%60%2C%20not%20%60openChat%60%2C%20so%20it%20never%20calls%20that%20function.%20The%20content%20branch%20also%20omits%20the%20existing%20Show%20chats%20button%2C%20so%20closing%20the%20list%20alone%20would%20leave%20no%20way%20to%20bring%20it%20back.%20Close%20it%20when%20scout%20content%20opens%20and%20expose%20a%20reopen%20button.%0A%0A%23%23%23%20Issue%203%0Aapps%2Fdesktop%2Fsrc%2Frenderer%2Fcomponents%2Fchat%2FchatPrProjectOpen.ts%3A136-142%0A%60openSeq%60%20detects%20another%20PR%20click%2C%20but%20not%20a%20project%20switch%20made%20elsewhere.%20If%20someone%20clicks%20a%20PR%20and%20then%20switches%20projects%20while%20its%20local%20project%20is%20opening%2C%20%60switchProjectToPath%60%20returns%20without%20taking%20the%20front%20back.%20This%20code%20still%20navigates%20to%20%60%2Fprs%60%20in%20the%20newly%20selected%20project.%20Check%20that%20the%20intended%20project%20is%20still%20active%20before%20sending%20the%20route.%20Apply%20the%20same%20check%20in%20%60openChatInWork%60%20before%20opening%20its%20chat.%0A%0A%23%23%23%20Issue%204%0Aapps%2Fdesktop%2Fsrc%2Frenderer%2Fcomponents%2Fchat%2FchatPrProjectOpen.ts%3A180-184%0AOrdinary%20URL%20chips%20on%20the%20project's%20scout%20page%20now%20bypass%20the%20person's%20browser%20preference.%20They%20previously%20called%20%60openLinkFromUi%60%2C%20which%20honors%20%60browser.linkOpenMode%60.%20The%20new%20helper%20always%20calls%20%60openUrlInAdeBrowser%60%20when%20%60onScoutsTab%60%20is%20false.%20Keep%20the%20special%20Scouts-tab%20destination%2C%20but%20use%20%60openLinkFromUi%60%20for%20ordinary%20links%20on%20the%20project's%20scout%20page.%0A%0A---%0A%0AFor%20each%20issue%20above%2C%20determine%20whether%20it%20is%20valid%20and%20should%20be%20fixed.%20If%20so%2C%20fix%20it%20directly.&repo=arul28%2Fdaex&pr=2946&platform=github"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaudeDark.svg?v=7"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaude.svg?v=7"><img alt="Fix All in Claude Code" src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaude.svg?v=7" align="right"></picture></a></h2>

    1. <img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top">&nbsp;Child\-chat links open a hidden browser <a href="https://github.com/arul28/DAEX/pull/2946#discussion_r4792108912">▶</a>
    2. <img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top">&nbsp;The list covers opened scouts <a href="https://github.com/arul28/DAEX/pull/2946#discussion_r4792108929">▶</a>
    3. <img alt="P2" src="https://greptile-static-assets.s3.amazonaws.com/badges/p2.svg?v=9" align="top">&nbsp;Delayed clicks replace newer navigation <a href="https://github.com/arul28/DAEX/pull/2946#discussion_r4792108944">▶</a>
    4. <img alt="P2" src="https://greptile-static-assets.s3.amazonaws.com/badges/p2.svg?v=9" align="top">&nbsp;Scout chips ignore browser settings <a href="https://github.com/arul28/DAEX/pull/2946#discussion_r4792108966">▶</a>

    <details><summary>Fix with agent prompt</summary>

    `

    ### Issue 1
    apps/desktop/src/renderer/components/bots/BotChildChatPage.tsx:153-157
    The new page hides the browser but does not enable the Scouts link behavior. Its `presentation` has no `profile`, so `ChipPrOpensInProjectContext` stays false. A normal Markdown web link reaches `PersonalChatsPage`'s browser listener, which consumes the click and sets `toolPanel`. That panel is not rendered while `content` shows this page, so nothing visibly opens. Pass the page's link destination explicitly instead of tying it only to `persistent_identity`.
    
    ### Issue 2
    apps/desktop/src/renderer/components/bots/BotsPage.tsx:150-153
    Below 768 px, the list still covers opened scout content. `mobileListOpen` starts true and closes only through `selectSession`. The new `botChat` route supplies `content`, not `openChat`, so it never calls that function. The content branch also omits the existing Show chats button, so closing the list alone would leave no way to bring it back. Close it when scout content opens and expose a reopen button.
    
    ### Issue 3
    apps/desktop/src/renderer/components/chat/chatPrProjectOpen.ts:136-142
    `openSeq` detects another PR click, but not a project switch made elsewhere. If someone clicks a PR and then switches projects while its local project is opening, `switchProjectToPath` returns without taking the front back. This code still navigates to `/prs` in the newly selected project. Check that the intended project is still active before sending the route. Apply the same check in `openChatInWork` before opening its chat.
    
    ### Issue 4
    apps/desktop/src/renderer/components/chat/chatPrProjectOpen.ts:180-184
    Ordinary URL chips on the project's scout page now bypass the person's browser preference. They previously called `openLinkFromUi`, which honors `browser.linkOpenMode`. The new helper always calls `openUrlInAdeBrowser` when `onScoutsTab` is false. Keep the special Scouts-tab destination, but use `openLinkFromUi` for ordinary links on the project's scout page.
    
    ---
    
    For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
    
    `

    </details>

    <h3>Summary</h3>

    Adds project-aware PR links, remembers the Scouts tab's location, and opens CTO child chats through their home project's copy.

  • A project scout’s chat opens in the Scouts tab with a route to Work.

  • The Scouts tab returns to the scout or chat you left open.

  • PR links in scout chats open the project’s PRs tab or GitHub.
  • <h3>Diagram</h3>

    %%{init: {'theme': 'neutral'}}%%
    flowchart TD
      A[Scouts tab] --> B[Scout chat]
      A --> C[CTO child chat]
      B --> D[Find project for PR]
      D --> E[Project PRs page]
      D --> F[GitHub when no copy exists]
      C --> G[Home project pin]
      G --> H[AgentChatPane]
      C --> I[Open in Work]
    

    <!-- greptile_confidence_score:3 -->

    <sub>Reviews (1) · Last reviewed commit: "fix(scouts): the bar over a scout&#39;s chat..." · Reviewed by Greptile</sub>

    <!-- /greptile_comment -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: cursor[bot] Review duration: 15m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.46)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 95% · Reviewer familiarity: 35%
    45%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #2946"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 45.6% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 45.6% · Lower = rushed or shallow review
    45.6%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.3% · Safe to merge
    28.3%
    Repository