Skip to content

Preserve linked page destinations in published search - #4566

Open
jpreynat wants to merge 2 commits into
mainfrom
jpreynat/rnd-10265-search-follow-link-pages
Open

Preserve linked page destinations in published search#4566
jpreynat wants to merge 2 commits into
mainfrom
jpreynat/rnd-10265-search-follow-link-pages

Conversation

@jpreynat

Copy link
Copy Markdown
Member

Changes

  • preserve absolute HTTP(S) paths already returned for linked sidebar pages as the exact search result href, including query strings and fragments in regular and embeddable search
  • keep existing relative GitBook page paths, embeddable GitBook links, section anchors, unresolved published-space handling, metadata, ranks, scores, and ordering unchanged
  • extract the pure page-result transform into a sibling module so the public Runway example can be covered with synthetic regression data
  • add no search request, redirect lookup, backend call, or meaningful latency; this only changes how an already-returned path is converted into an href

The backend change in GitbookIO/gitbook-x#25237 makes linked sidebar pages searchable. This GBO change preserves their configured external destination when rendering the returned result.

Testing

  • bun run format
  • bun run lint
  • cd packages/gitbook && bun run typecheck
  • cd packages/gitbook && bun test src/app/sites/dynamic/[mode]/[siteURL]/[siteData]/~gitbook/search/route.test.ts (8 passed)

Follow-up

Linear: RND-10265

Do not resolve the Linear issue on merge. After both backend and GBO changes are deployed, the affected Runway space still needs to be reindexed and verified in published search.

@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

RND-10265

@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2890e1c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@argos-ci

argos-ci Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2-cloudflare (Inspect) ⚠️ Changes detected (Review) 2 changed, 2 ignored Aug 31, 2026, 9:55 PM
customers-v2-vercel (Inspect) ⚠️ Changes detected (Review) 1 changed, 3 ignored Aug 31, 2026, 9:54 PM
v2-cloudflare (Inspect) ✅ No changes detected 1 ignored Aug 31, 2026, 9:58 PM
v2-vercel (Inspect) ✅ No changes detected 7 ignored Aug 31, 2026, 9:57 PM

@github-actions

Copy link
Copy Markdown
Contributor

Style invalidation on a large API reference

Elements restyled by opening one popup on the Snyk API reference. A share near or above 100% means the insertion restyles the whole document.

interaction restyled page share budget
openapi-select 6 10,729 0.1% 25%
search 631 10,729 5.9% 125%

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