Skip to content

client: a link in a chat opens the host's right panel behind FlyBot's own fixed panel, so the page looks blank until the panel is closed #2201

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: c88053daa3e948418ffb0dc0ad63122b
Branch: dev/2-chat-link-delegate
Base: 9ede925
At: 2026-11-02T16:23:45Z
Owner: Dev-2
Tier: T1

What happens today

A link in a chat message opens the host's own right-hand panel — and FlyBot's right-hand panel is a fixed, opaque layer on top of it. The content area therefore looks blank and nothing reports an error; closing FlyBot's panel reveals a page that was there all along.

Reproduction (from the report in #1803): open a session that carries a GitHub link → open a Bot's details panel on the right → click the https://github.com/... link in the message → the content area is empty and no error appears; close the details panel and the same page is visible.

The cause is not GitHub authentication. Two right edges that do not know about each other:

  • core/src/client/cells.js:60 renders a message body as h(MarkdownText, …) with no delegate of its own. grep -rn "MarkdownDelegateProvider\|openExternalLink" core/src plugins returns 0 hits — FlyBot never registers a link handler, so the click falls through to the host.
  • The host's own handler (dsh-client-ui-chat/lib/client.js:5281, handler at :12435-12437, default linkOpening = "sidebar" at :11942) opens a browser tab in its right sidebar through ctx.sidebarRight.openTab("browser", { params: { url } }), or falls back to window.open.
  • FlyBot's panel is a fixed opaque layer: core/src/client/styles.js:365 .bt-panel { position: fixed; right: 0; bottom: 0; width: var(--bt-panel-w,320px); z-index: 40; background: var(--bt-main) }, and it only reserves column space for itself when it opens (browser-pane.js:85-86, :443). grep -rn "sidebarRight" core/src returns 0 hits: the host's right panel is neither known to FlyBot nor given room.

So the reader's report ("it is blank when the Bot panel is open") is the occlusion, not the link.

Expected behaviour

A link in a chat opens FlyBot's own panel, the one the reader already uses: actions.openBrowser (core/src/client/index.js), which is browsers.openTab plus ui.set({ view: 'browser' }). Nothing about the host's sidebar needs to change, and no second right edge is introduced.

Reproduction (red first)

A new core/test/chat-link-open.test.js: click the <a href="https://github.com/o/r/issues/2"> on an assistant cell while ui.details is non-empty, and assert the URL reached FlyBot's own panel (ui.view === 'browser' and browsers.openTab(botId, url) — or window.open — was called). It fails today because no delegate exists at all: the click never enters our code.

Scope

  • core/src/client/cells.js — register a MarkdownDelegateProvider whose openExternalLink calls the existing actions.openBrowser, so the click is handled inside FlyBot.
  • core/test/chat-link-open.test.js — the red-first test above, plus a control case: with no details panel open the behaviour is the same as today (the link still ends in FlyBot's panel, not the host's sidebar).
  • Regenerated core/client.js and the patches/ds-bot/* mirrors, one line in docs/subsystems/core-client.md, and changelog.d/<this issue>-chat-link-delegate.fixed.md.

Out of scope: the host's linkOpening setting, the host's sidebar, styles.js and the panel width, and anything about repository permissions — that is P-421 on Product's backlog (a GitHub 404 inside the in-app browser saying "you may need to sign in"), deliberately not folded in here.

Prior art / duplicates

Searched before opening (link sidebar browser blank, 面板 遮挡 右栏 链接) plus the closed set around links and panels:

  • #1803 — the report this comes from (needs-human, someone else's issue); we do not touch its labels or comments, and this issue cross-references it.
  • #1346 / #1347 / #1017 — closed click-through findings about drawers, previews and blank chats; none of them is a link delegate.
  • No open or closed issue registers a Markdown link delegate in cells.js.

Acceptance

  1. Clicking a link in a chat with the details panel open lands in FlyBot's own browser panel: ui.view === 'browser' and the URL is in the open tab list.
  2. The host's sidebarRight is not used at all (still 0 hits under core/src).
  3. No change to message rendering, to window.open fallbacks elsewhere, or to the details panel's own open/close.
  4. The new test fails on 9ede9258 and passes after the fix; npm run verify green, patches check/canonical clean, arch-docs: OK.

Activity

  1. HugoXK commented on Nov 3, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: c88053daa3e948418ffb0dc0ad63122b
    At: 2026-11-03T13:28:09Z

  2. HugoXK commented on Nov 3, 2026

    @HugoXK
    ContributorAuthor

    Written-by: Dev2

    Re-cut on the new base, ready for review.

    • Base: a11983c5bf8cfbe8da391c201e520750ac2b48eb
    • Pushed head: ed9192f1eb5dbfa20c1ef13baeccde5bf347facc
    • Tree: 7c635a6ea867a0d2b2a3512e34fc57754a482753
    • core/client.js and patches/ds-bot/** are regenerated on this base by core/scripts/build-client.mjs and scripts/ds-bot-patches.mjs generate; the rest are hand edits.
    changelog.d/2201-chat-link-delegate.fixed.md 1/0      hand
    core/src/client/cells.js 24/4                          hand
    core/test/chat-link-open.test.js 181/0                 hand
    docs/subsystems/core-client.md 1/0                     hand
    core/client.js 14/3                                    generated
    patches/ds-bot/0003-flybot-api-client.patch 36/7       generated
    patches/ds-bot/0008-client-bundle.patch 15/4           generated
    patches/ds-bot/files/test/chat-link-open.test.js 181/0 generated
    

    8 files, +453/−18 (hand edits 207 lines; the rest is regenerated). Nothing changed in index.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions