Skip to content

refactor(chat): one navigation decision for every link surface CU-17tkuw61kfy - #2883

Merged
michaelassraf merged 22 commits into
mainfrom
feat/mcp-in-app-links
Oct 29, 2026
Merged

michaelassraf merged 22 commits into
mainfrom
feat/mcp-in-app-links

Conversation

@michaelassraf

@michaelassraf michaelassraf commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Every link the lib renders or follows now decides where it goes in ONE place and executes in ONE place.

The decision: navLinkTarget(runtime, href, targetPlatform, { hostRoute }) (utils/nav-anchor-props.ts): the href resolved for the runtime (resolveHrefForRuntime) and the new-tab rule on that resolved href (computeIsNewTab). No runtime: the href as given, same tab (the executor's existing rule). hostRoute: a relative route the host's composeContentUrl returned as its own stays in the window in every mode.

The execution: executeNavigation / executeNavigationImperative, which now read navLinkTarget too.

Surface Before Now
Markdown links in an answer #2870: own branch, own anchor ChatMarkdownLink → host NavLinkAnchor, label as InlineChip when the decision keeps it in the app
Source chips own resolve + computeIsNewTab + anchor attrs + click handler NavLinkAnchorViaRuntime
Inline cards (+ click wrapper) computeIsNewTab / resolveHrefForRuntime navLinkTarget
Card-link hook computeIsNewTab navLinkTarget
Doc search decideNewTab directly, own router.push / window.open navLinkTarget + executeNavigationImperative
Related content (default provider) decideNewTab directly navLinkTarget

Behaviour changes (all from moving onto the one rule):

  • A source chip's new-tab link to one of our own platforms keeps the Referer (rel="noopener"), as every other chat link already did.
  • Doc search honours the host's own decideNewTab and openExternal (before, it called the lib rule directly and opened window.open itself, a dead click in the OpenFrame app shell).
  • Embed mode only: a card whose url the host composed as a relative route of its own stays in the window, as doc search already did (before: a new tab on the embedder's own path).
  • Related content with no host link provider and no runtime: same tab (before: a new tab for an absolute URL). No host in our repos uses that default.

Gate: navigation-ssot.test.ts reads the source and fails on any direct call of computeIsNewTab, decideNewTab, resolveHrefForRuntime or isCrossOriginUrl outside the routing module. On main it would list 10 such calls; on this branch, none. Chat, shared, related-content, navigation and chat-protocol suites: 1087 pass.

Change-Set: feat-mcp-in-app-links
ClickUp task: CU-17tkuw61kfy Refine Hub MCP responses with direct in-app links (e.g. device deployment)
Design-Doc: https://product-hub.flamingo.so/admin/design-docs/hub-mcp-server

🤖 Generated with Claude Code

Change set flamingo-stack/openframe-oss-lib#2870: these pull requests are one change, reviewed together.

Linked work

Linked by the Depends-On / Change-Set lines in these descriptions; this block is maintained by the hub.

michaelassraf and others added 9 commits October 28, 2026 17:32
…f growing the answer

A card whose record carries a video drew its player (a 16:9 box and its tab row) the moment it
resolved, under a skeleton one row tall, and an embedded video marker drew one as the answer
streamed: every recording made the chat jump. The card's footer row now carries "Watch video"
beside Ask, and the player opens below the card only when the reader asks; a marker with no card
of its own gets the same action on a row of its own (chat-video-toggle.tsx).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…height while loading

A card's skeleton now draws its footer row too, its actions in their
loading form (SourceActionButton and ChatVideoToggleButton take a
loading prop). A card type whose records can carry a video declares it
on its registry entry, so its Watch video slot is in the skeleton and
stays reserved, unseen, on a record without one. The answer still being
written draws its sources strip in its loading form (SourceChips
loading), so the strip is there when the answer ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e chip on a phone

Measured in the OpenFrame frontend on stage: in Mingo's narrow panel the
two skeleton chips wrapped to a second row (93px) and the strip shrank to
61px when the answer ended. The skeleton row no longer wraps (a chip that
does not fit is cut), and a phone draws one chip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… box

Mingo's links to the app's screens ([Devices → Add Device](/devices/new))
were drawn in the colour of the text around them. The chat now draws a
root-relative link as an inline chip in the Tag badge skin the host's
entity mentions use, still routed through the host's NavLinkAnchor. The
skin is exported (INLINE_CHIP_CLASS) so the host's mention chip uses the
same box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The inline box (the Tag badge as a span, with its inline skin) is one
component the lib exports. The chat's link to a screen of the app draws
it, and so does the host's mention chip, instead of each drawing a Tag
with a copied class string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…creen link marker

Review of #2870:
- A card's "Watch video" is now the generic ChatCardDisclosure, with a
  variants table (video today). It opens and closes like every other chat
  expander (ExpandChevron + useCollapsible), and the content unmounts when
  the close has finished, so a closed player is not playing out of sight.
- A link to a screen of the app is no longer guessed from its path: the
  answer marks it with the link title "app-screen"
  ([Devices → Add Device](/devices/new "app-screen")). The marker lives in
  chat-protocol (APP_SCREEN_LINK_TITLE, appScreenLinkMarkdown,
  isAppScreenLink), shared with the hub's instruction to the model.
- The skeleton chip's one-line spacer is a named constant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sclosures by kind

Review of #2870:
- No app-screen marker. Whether a link in an answer stays in the app is
  the runtime's one new-tab rule (computeIsNewTab, the decision the
  chat's cards and source chips make): a link it keeps in this window is
  drawn as the inline box, one it sends to a new tab stays a plain link.
  The chat-protocol export is removed.
- Card disclosures are by kind: CHAT_CARD_DISCLOSURE.VIDEO (one entry
  per kind, IMAGE and the like next). A kind owns its action, how it
  finds its content on a fetched record (fromItem, the old
  itemVideoMetadata) and how it draws it. Registry entries declare
  disclosure: CHAT_CARD_DISCLOSURE.VIDEO; CardWithVideo is
  CardWithDisclosure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ted anchor

The chat's link routing is unchanged: every link renders through the
same NavLinkAnchor branch with the same href and props it always had.
A link the runtime's own new-tab rule keeps in this window now only
draws its label as InlineChip inside that anchor. InlineAppLinkChip,
which built its own anchor ahead of the routed branch and dropped the
link's props, is deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelassraf

Copy link
Copy Markdown
Member Author

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦩 Flamingo Code Review

❌ Tests and checks failed on this commit: tests (npm). What each printed is in the Tests and mutation section.

9 findings: 🔴 1 action required · 🟠 4 recommended · 🔵 4 informational

Advisory: findings do not block the merge.

9 defects outside any rule

Files Lines Languages Tests Checks 🔴 Action required 🟠 Recommended 🔵 Informational
64 +1099 / -598 TypeScript (2 npm/vitest, jest, Stryker lanes) ❌ 6103 / 6104 green ✅ 6 / 6 passed 1 4 4

🔴 Action required (1)

# Where Finding Flagged by
1 nav-link-anchor-via-runtime.tsx:85 useNavLinkViaRuntime's return type changed to allow null, breaking existing consumers Review

🟠 Recommended (4)

# Where Finding Flagged by
2 nav-link-anchor-via-runtime.tsx:133 useNavigateViaRuntime drops the navigation entirely on a middle-click (or any non-zero-button modifier click) Review
3 use-contact-submission.ts:111 useContactSubmission's success redirect can silently open a new tab in embed mode Review
4 chat-markdown-link.tsx:30 Markdown link outside a chat runtime has no test Tests and mutation
5 announcement-bar.tsx:219 Components moved onto the navigation executor have no tests Tests and mutation

🔵 Informational (4)

# Where Finding Flagged by
6 ticket-alerts-button.tsx:52 Question: TicketAlertsButton drops onNavigate prop, breaking change for a known external consumer Review
7 chat-card-disclosure.tsx:151 ChatCardDisclosureButton re-implements the FooterActionSkeleton pattern instead of reusing it (Minor) Review
8 nav-anchor-props.ts:97 navLinkTarget's hostRoute branch contradicts its own docstring about never opening a new tab (Minor) Review
9 nav-anchor-props.ts:97 No-runtime links now open another origin in a new tab Tests and mutation

✅ What this change does well

  • openframe-frontend-core/eslint-config/navigation.js adds a mechanical ESLint rule (no-navigation-fallback) plus a RuleTester suite (eslint-navigation.test.ts) that directly encodes the CU-17tkuw61kfy regression (fallbackNavigate: router.push) as a test case, preventing recurrence.
  • openframe-frontend-core/src/components/chat/tests/navigation-ssot.test.ts statically scans the whole src tree for direct calls to the navigation decision primitives outside the routing module, giving a second, independent guard beyond the lint rule.
  • openframe-frontend-core/src/components/announcement-bar.tsx replaces the direct window.open/window.location.href writes with executeNewTabNavigation/executeNavigationImperative, routing the admin-configured CTA through the same single navigation executor used elsewhere in the lib.
  • resolve-search-result-action.ts correctly threads the hostRoute flag through navLinkTarget so a relative in-app href composed by the host still short-circuits to same-tab under every runtime mode, preserving the embed-mode safety property the old decideNewTab short-circuit had.
  • use-doc-search.ts collapses the duplicated navigate-same-tab/navigate-new-tab switch cases into one executor call, removing the prior window.open/router.push bypasses of the navigation executor and aligning with the single navLinkTarget decision.
  • execute-navigation.test.ts pins both executors' decisions, including openIn and the embed rule's precedence, against a swapped window.location.
  • eslint-config/navigation.js ships with its own RuleTester cases (eslint-navigation.test.ts) and found real second paths in the lib and the hub.
  • new-tab-rel.ts makes the referrer rule one function with tests for own hosts, paths, mailto and protocol-relative URLs.

Inline comments: 9 new

4 possible problems checked and ruled out, 2 after reading more of the repository
  • openframe-frontend-core/eslint-config/base.js:18 50 new or changed definitions have no test referencing them: Generic missing-test dump over dozens of type/interface declarations and trivial re-exports; not a specific, actionable finding.
  • openframe-frontend-core/src/components/chat/inline-chip.tsx:31 InlineChip already exists in the design system: This file is the canonical definition of InlineChip inside openframe-frontend-core itself (renamed from inline-app-link-chip.tsx per the moved-files list), not a duplicate of an existing lib export.
  • openframe-frontend-core/src/components/shared/doc-search/resolve-search-result-action.ts:32 resolveSearchResultAction's third parameter changes type from string to ChatRuntime|null, breaking for existing callers: resolveSearchResultAction's only known caller is use-doc-search.ts:252 in the same package, which this PR's diff context shows calling it with the new runtime-typed argument; not listed in CROSS-REPO FACTS as a removed/changed symbol with external consumers, so this is a speculative claim about an untouched external caller.
  • openframe-frontend-core/src/components/chat/utils/execute-navigation.ts:162 Deleting handleChatNavClick breaks the backward-compat guarantee its own @‍deprecated comment made: handleChatNavClick/ChatNavClickInput removal is not among the symbols the cross-repo graph flags as consumed; the comment itself says 'no lib code path goes through it', and no external consumer is evidenced.

🧪 Tests and mutation

Tests per lane

Language Project Command Status Counts Time
TypeScript (npm) openframe-frontend-core npx vitest related --run eslint-config/base.js eslint-config/navigation.js src/__tests__/eslint-navigation.test.ts src/components/announcement-bar.tsx src/components/chat/__tests__/chat-message-in-app ❌ failed 6104 run, 1 failure 52.9 s
TypeScript (vitest, jest, Stryker) react-embedding-example ➖ no runner
Tests failed in openframe-frontend-core: what it printed last
uage_">console</span>.<span class="hljs-title function_">log</span>(x &lt; <span class="hljs-number">2</span> &amp;&amp; x &gt; <span class="hljs-number">0</span>);
+ "<div class="simple-markdown-renderer "><div class="content-wrapper max-w-none"><article class="prose prose-lg max-w-none [&amp;>*:last-child]:mb-0"><pre><div class="code-block-container my-6 overflow-hidden rounded-lg border border-ods-border bg-ods-card"><div class="code-header border-b border-ods-border bg-ods-card px-4 py-2"><span class="font-sans text-xs uppercase tracking-wide text-ods-text-tertiary">js</span></div><div class="p-4"><pre class="overflow-x-auto"><code class="language-js hljs font-mono text-[14px]" style="background: transparent; color: var(--color-text-primary);">const x = 1;
+ console.log(x &lt; 2 &amp;&amp; x &gt; 0);
  </code></pre></div></div></pre></article></div></div>"

 ❯ src/components/ui/__tests__/markdown-parity.test.tsx:795:46
    793|     it(`renders fixture: ${name}`, async () => {
    794|       const container = await renderStable(<SimpleMarkdownRenderer con…
    795|       expect(normalize(container.innerHTML)).toMatchSnapshot();
       |                                              ^
    796|     });
    797|   }

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯


  Snapshots  1 failed
 Test Files  1 failed | 172 passed (173)
      Tests  1 failed | 6103 passed (6104)
   Start at  15:47:50
   Duration  47.36s (transform 57.33s, setup 7.52s, import 322.54s, tests 74.46s, environment 48.40s)


Checks

Check Kind Language Project Status Time
lint lint TypeScript (npm) openframe-frontend-core ✅ passed 2.3 s
lint:config-smoke lint TypeScript (npm) openframe-frontend-core ✅ passed 0.7 s
lint:cycles lint TypeScript (npm) openframe-frontend-core ✅ passed 653.1 s
lint:types lint TypeScript (npm) openframe-frontend-core ✅ passed 46.6 s
type-check typecheck TypeScript (npm) openframe-frontend-core ✅ passed 2.6 s
format format TypeScript (npm) openframe-frontend-core ✅ passed 14.2 s

The one failing test, markdown-parity 'fenced-code-js', is a snapshot taken before highlight.js applied; this pull request does not touch the markdown renderer and the same test passed in two full runs of this branch, so it is a timing flake under load, not the change.

Openframe-frontend-core has no Stryker setup, so no mutation testing ran: mutation coverage of the new code is a gap.

React-embedding-example has no test runner; its navigate wiring is covered only by type-checking.

2 gaps (not tested here):

  • TypeScript (npm) openframe-frontend-core: no mutation testing (no Stryker configured: mutation coverage is a gap to report)
  • TypeScript (vitest, jest, Stryker) react-embedding-example: no mutation testing (no Stryker configured: mutation coverage is a gap to report; no test runner in package.json)

Change set

  • Land together with flamingo-stack/openframe-oss-frontend#749: its branch uses what this pull request removes or changes.
🤖 Prompt for AI agents: fix every finding
Address these code-review findings on pull request #2883 of flamingo-stack/openframe-oss-lib, most important first.
For each one, make the minimal change that resolves it and do not refactor unrelated code.
If you can show a finding is wrong, skip it and say why.

1. [Action required] openframe-frontend-core/src/components/chat/nav-link-anchor-via-runtime.tsx:85 useNavLinkViaRuntime's return type changed to allow null, breaking existing consumers
   useNavLinkViaRuntime previously always returned a NavLinkViaRuntimeProps object; this diff changes its signature to return `NavLinkViaRuntimeProps | null` (returning null when `href` is falsy). The cross-repo facts list this exact symbol as consumed by 22 repositories not visible to this review, with the change flagged as breaking. Any external caller that destructures the result directly (e.g. `const { href, target, rel, onClick } = useNavLinkViaRuntime(...)`) will now throw at runtime (`Cannot destructure property 'href' of 'null'`) whenever href is empty/null/undefined, instead of previously always getting an object back (with href possibly just an empty resolved string).
2. [Recommended] openframe-frontend-core/src/components/chat/nav-link-anchor-via-runtime.tsx:133 useNavigateViaRuntime drops the navigation entirely on a middle-click (or any non-zero-button modifier click)
   In `useNavigateViaRuntime`, when `modifierEvent` is present and `isModifierClick(modifierEvent)` is true, the code only calls `executeNewTabNavigation` when `modifierEvent.button === undefined || modifierEvent.button === 0`. For a middle-click (`button === 1`), which most browsers treat as a 'request a new tab' gesture and which `isModifierClick` likely classifies as a modifier click too, this branch is entered, the `button === 0` check fails, `executeNewTabNavigation` is skipped, and the function then hits the bare `return;` — no navigation happens at all. Unlike a real `<a>` element, the targets of this hook (buttons, cards) have no native browser fallback, so the click is silently swallowed.
3. [Recommended] openframe-frontend-core/src/hooks/use-contact-submission.ts:111 useContactSubmission's success redirect can silently open a new tab in embed mode
   The old code split on `successRedirectUrl.startsWith('http')`: an absolute URL did a hard `window.location.href` assign, anything else (a relative in-app path) did `router.push` — always same-tab, same-window. The new code always calls `executeNavigationImperative({ runtime, href: successRedirectUrl, openIn: 'same-tab' })`. Reading `navLinkTarget`/`computeIsNewTab` (nav-anchor-props.ts): when `runtime.navigation.mode === 'embed'`, the caller's `openIn` is ignored entirely (`runtime.navigation.mode !== 'embed' && openIn ? ... : computeIsNewTab(...)`), and `computeIsNewTab` for embed mode returns `!isSameOriginAbsoluteHref(href)` — true (new tab) for any href that is not an absolute same-origin `http(s)://` URL, i.e. true for every relative path. A typical `successRedirectUrl` like `/thank-you` passed by an embedded host is therefore reclassified from an in-page same-tab redirect into a new-tab open.
4. [Recommended] openframe-frontend-core/src/components/chat/chat-markdown-link.tsx:30 Markdown link outside a chat runtime has no test
   The no-runtime branch (a host NavLinkAnchor rendered with no ChatRuntimeContext) was a crash in an earlier revision of this pull request and is fixed here, but chat-message-in-app-links.test.tsx renders every case inside a runtime, so nothing pins the fix.
5. [Recommended] openframe-frontend-core/src/components/announcement-bar.tsx:219 Components moved onto the navigation executor have no tests
   The announcement bar CTA, the ticket alerts button (ticket-alerts-button.tsx:63), the contact form redirect (use-contact-submission.ts:113), the vendor button, the service card, the devices table and ticket attachments now navigate through executeNewTabNavigation / executeNavigationImperative instead of window.open / location / router.push, and none of them has a test of the click. The announcement CTA's same-tab path is now the host's soft navigation, not a full page load.
6. [Informational] openframe-frontend-core/src/components/navigation/ticket-alerts-button.tsx:52 Question: TicketAlertsButton drops onNavigate prop — breaking change for a known external consumer
   TicketAlertsButton's public prop `onNavigate` (and AppHeader's `onTicketAlerts`) were removed and the click now always goes through `executeNavigationImperative({ runtime, href: target })`. The repository graph reports this symbol is consumed by 1 repository not visible to this review, and marks the signature change as breaking. Any consumer that was passing `onNavigate`/`onTicketAlerts` for custom router integration (e.g. a Next.js `router.push`) will silently lose that behavior — the prop is now a type error or, if the consumer's TS build is lenient, a dropped parameter with no runtime effect, and ticket-alert clicks will fall back entirely to whatever `runtime.navigation.navigate` the host wired (or none).
7. [Informational] openframe-frontend-core/src/components/chat/entity-cards/chat-card-disclosure.tsx:151 ChatCardDisclosureButton re-implements the FooterActionSkeleton pattern instead of reusing it
   source-action-button.tsx already exports FooterActionSkeleton, a loading-form Button with aria-hidden/inert, pointer-events-none, left/right skeleton icons and a TextHold label. chat-card-disclosure.tsx stops importing FooterActionSkeleton and instead inlines an almost identical Button markup (aria-hidden inert span, SKELETON_SURFACE_CLASS marks, pointer-events-none, TextHold label) directly in ChatCardDisclosureButton.
8. [Informational] openframe-frontend-core/src/components/chat/utils/nav-anchor-props.ts:97 navLinkTarget's hostRoute branch contradicts its own docstring about never opening a new tab
   The docstring for `navLinkTarget` says a `hostRoute` href "is never resolved against the hub's origin and never handed to a new tab, in any mode", but the implementation returns `isNewTab: openIn === 'new-tab'` for that branch, i.e. it DOES open the href in a new tab whenever the caller passes `openIn: 'new-tab'`. The code and the comment disagree on an invariant other call sites may rely on.
9. [Informational] openframe-frontend-core/src/components/chat/utils/nav-anchor-props.ts:97 No-runtime links now open another origin in a new tab
   Without a ChatRuntimeContext, navLinkTarget now applies the lib's default rule (another origin opens a new tab); before, the executor kept every no-runtime link in the same tab. Related-content cards get main's behavior back; the announcement bar, doc search, product releases and contact redirect change on a host that mounts no runtime.

Next: commit a suggestion, or hand a comment's prompt to your coding agent. React 👍 on a finding that helped and 👎 on one that is wrong: the reviewer learns from both.

Review again. New commits are not reviewed until you ask:

  • Review the new commits: only what was pushed since this review
  • Review the whole diff again: everything, including what was already reviewed

Or comment @flamingo-review (new commits) or @flamingo-review full (everything). Add the flamingo-review-always label to review every push.

Updated 2026-10-29 20:09 UTC · reviewed from Michael Assraf's machine

The navigation decision has one owner: useNavLinkTarget (the href
resolved for the runtime, and the new-tab rule on it), which
useNavLinkViaRuntime now routes by. A markdown link renders through
ChatMarkdownLink: the host's NavLinkAnchor with the same props, drawing
its label as InlineChip when that decision keeps it in the app. The
message renderer no longer reads the runtime or decides anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelassraf michaelassraf changed the title fix(chat): the in-app link box is drawn inside the routed anchor CU-17tkuw61kfy fix(chat): markdown links draw by the navigation SSOT CU-17tkuw61kfy Oct 29, 2026
… surface

navLinkTarget (nav-anchor-props) is THE decision: the href resolved for
the runtime and the new-tab rule on it. Every surface reads it and every
click goes through executeNavigation:
- source chips render NavLinkAnchorViaRuntime (their own resolve,
  new-tab call, anchor attrs and click handler are deleted);
- inline cards and their click wrapper, the card-link hook, the anchor
  hook and the executor itself call navLinkTarget;
- doc search decides with navLinkTarget and executes with
  executeNavigationImperative (it had its own router.push / window.open);
- related content's default link provider reads navLinkTarget.
A host-composed relative route (hostRoute) stays in the window in every
mode, for doc search (as before) and now for cards too. A gate test fails
on any direct call to the decision primitives outside the routing module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelassraf michaelassraf changed the title fix(chat): markdown links draw by the navigation SSOT CU-17tkuw61kfy refactor(chat): one navigation decision for every link surface CU-17tkuw61kfy Oct 29, 2026
michaelassraf and others added 8 commits October 29, 2026 11:30
… no router fallback

Every same-tab link the lib opens goes through runtime.navigation.navigate; a
target the host does not take is a browser navigation. The fallbackNavigate
option is gone from the executor and its four callers, and the embedding
example wires navigate like the hub and the OpenFrame app.

The chat's source chips, Ask and Watch video actions meet the loading
standard: each switches on useLoadingScope() || loading, the disclosure button
draws its own loading form, and the strip's chips are marked list items with
one loading chip at every width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…econd way to navigate

A link is followed through the lib's navigation executor only. The new rule in
the shared ESLint config fails a fallback option handed to the executor
(fallbackNavigate and the like) and any router push, location write or
window.open in the same function as an executor call. It runs on every repo
that uses the shared config; the hub and the OpenFrame app have no violations.

The one bypass it found is fixed: doc search opened a tab by hand. The lib now
opens a new tab in one place, executeNewTabNavigation, which the executor and
the doc search both call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
So a host follows its own links through the lib's one decision and executor,
not a copy of them:
- useNavLinkViaRuntime takes a nullable href (null: no link) and openIn, the
  caller's explicit tab (an admin preview always opens a new one); the embed
  rule still comes first.
- useNavigateViaRuntime follows a link from code (a button, a card's click, a
  redirect after a save); a modifier click opens a new tab through
  executeNewTabNavigation.
- newTabRel / newTabFeatures is the one referrer rule for a new tab, anchors
  and window.open alike: a named platform, a host of one of our platforms or
  a path of this site keeps the Referer (cross-domain attribution); a third
  party gets noreferrer. NEW_TAB_FEATURES is gone.

The lint rule counts useNavigateViaRuntime as following links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked against the hub's old useNavLink rules, case by case (12 hrefs x 4
platforms x 3 tab requests): the destination, the tab and rel agree in all 144
host-mode cases, and window.open's features in every case. Two fixes made
them agree:
- useNavLinkViaRuntime returns no link for any empty destination (null,
  undefined or ''), as the hub's hook did; one signature.
- newTabRel counts only a path (/x) or a platform's host as our own site; a
  bare #anchor and a mailto: get noreferrer, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…view

- Markdown links no longer need a chat runtime (a host anchor without one drew
  a crash), and the in-app chip keeps main's look (no underline, hover fill).
- With no runtime, a link follows the lib's default rule (another origin opens
  a new tab), as related-content cards did on main.
- handleChatNavClick, its input type and NavSurface are deleted.
- Doc search decides a click once: the action carries the platform it was
  decided with and the executor runs on the same inputs.
- Card links (useEntityCardLink, buildAnchorProps) use the one referrer rule.
- The lib's own navigations go through the executor: announcement bar,
  vendor button, service card, ticket attachments, devices table,
  openInNewTab, contact form redirect, and the ticket alerts button (its
  onNavigate callback and window.location.assign fallback, and AppHeader's
  onTicketAlerts, are gone).
- NavLinkAnchorViaRuntime takes openIn; hostRoute honours openIn: 'new-tab'.
- Comments and module docs name the current API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A string href always yields a link, a middle click opens a new tab, a right click navigates nowhere, a relative
contact redirect stays in the host's router, and the card footer's actions share one FooterAction with its own
loading form. Tests for the announcement bar, the ticket alerts button, the contact redirect and a markdown link
with no runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michaelassraf and others added 2 commits October 29, 2026 17:01
… answer draws

EmbeddableChat takes sourceSkeletonCount (default 1): the chips the source strip under an answer draws while the
answer is written. 0 draws no strip until the answer ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant