Compare commits

..

2 Commits

Author SHA1 Message Date
Nolann Biron 1cfc0c1f99 changeset 2026-08-14 14:32:43 +02:00
Nolann Biron 6ca03e53b4 Attribute markdown and ask events to their space
`page_markdown_request` and the `ask_question` the middleware emits for `?ask=`
carried only a displayContext, so they were stored with an empty spaceId and an
unparseable siteSpaceId. Any space- or section-scoped query dropped them, and the
markdown traffic of a space read as zero.

Reuse the location the middleware already builds, as `rss_request` does. The
llms branches keep theirs: llms.txt spans every section and site-space, so a
single spaceId would attribute a site-wide document to one of them.

`ask_question` also gains the goal, which was parsed off the query string to be
encoded in the rewrite and then dropped from the event.

The pageId the TODO asked for is not in the URL, and resolving it in the
middleware costs a request per document served; it is left to the API to return
alongside the space.
2026-08-14 14:32:36 +02:00
461 changed files with 4800 additions and 19035 deletions
@@ -1,48 +0,0 @@
---
name: write-pr-description
description: Write a concise, product-focused PR description from the changes and available discussion. Use when asked for a PR summary or description.
---
# Write a PR description
Read the full branch diff and commit history against the PR's base branch, not just the latest commit. Use the PR discussion and linked issues for context when available. The PR's changes are the source of truth for what ships if an issue describes something different.
Write for contributors and reviewers who may not know the area. Lead with what changes, prefer user or product impact when supported, and include implementation details only when they help review. Keep the proposed changes short, using bullets only when useful.
Include relevant validation and screenshots when available. Do not claim checks passed unless they ran. Use only information appropriate for a public repository; do not copy private issue details or customer information into the description.
## Template and changelog
Read `.github/pull_request_template.md` immediately before writing. Preserve its required section names and order. Include `Proposed changes` and `Changelog`; omit `Demo` when there is nothing to show. Add optional `Context` before `Changelog` only when it meets the rule below.
Write a short changelog entry describing what shipped. Use `[Feature]` for user-facing additions or improvements, `[Fix]` for user-facing bug fixes, and `[Chore]` for internal maintenance. For features and fixes, say what users can do or what no longer goes wrong in plain words. Keep chores useful to teammates without inventing user impact. Remove unused examples and placeholders. Usually one entry is enough; use more only for distinct changes. The PR changelog does not replace any changeset required by `AGENTS.md`.
## Optional context
Write `Proposed changes` and `Changelog` first. Add `Context` only when it tells someone unfamiliar with the area something material that the changelog does not. `Problem` names a concrete failure or limitation supported by the PR or discussion. `Outcome` names what this PR delivers at its actual scope. Omit the section if either field would repeat the changelog, describe only implementation, or guess at an impact.
```markdown
## Context
**Problem:** <concrete failure or limitation>
**Outcome:** <result delivered by this PR>
```
Keep each field to 1–2 short, non-technical sentences. Prefer user or product impact when supported. For infrastructure changes, explain the failure or limitation they caused. Do not invent an actor, customer segment, ownership, or impact, or force the change into a user story. Do not turn a preparatory change into a claim that the whole workflow is fixed. Keep the roles distinct: `Context` explains why this matters, `Changelog` says what shipped, and `Proposed changes` can explain implementation.
Examples:
- A dependency bump with no demonstrated user effect needs no `Context`.
- If creating the first change request leaves the user on an empty screen, say that it now opens after creation. Leave the animation-listener details in `Proposed changes`.
- If a PR indexes links for later checks, describe the indexing result. Do not claim every link has already been checked.
## Writing pass
- Use plain words and direct verbs: "use" instead of "leverage", "help" instead of "facilitate". Prefer active voice when the actor is known.
- Name the concrete behavior instead of saying "improves the experience" or "makes it more robust". Support performance claims with measurements.
- Cut filler, promotional language, and generic conclusions. If a sentence could fit almost any PR, make it specific or delete it.
- Keep one idea per sentence and use consistent names. Remove redundant hedging without hiding real uncertainty.
- Avoid "not just X, but Y", forced groups of three, em dashes, decorative emojis, and unnecessary bold text.
Return the description in a Markdown code block unless asked to update the PR. When asked to update it, apply the description with `gh pr edit` using a body file.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix "View activity" disclosure in AI Chat not opening after the Base UI migration.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Add `leaveAgentFeedback` and `leaveUserFeedback` assistant tools, reporting documentation findings to the site's team through the same path as the MCP `sendFeedback` tool, and record an `agent_feedback` insights event on both surfaces.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop showing previously asked questions as suggestions in the GitBook Assistant
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Simplify carousel overflow with symmetric edge masks and visible-item paging. Replaces complex negative-margin bleed logic with transparent edge fades and page-by-visible-item scrolling.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep the breadcrumbs from covering the page actions' hit area.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Include published page descriptions in the page's Markdown output.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Bump Next.js to 16.3.3.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix select filters not working on table and cards blocks.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Chunk oversized visitor auth cookies to fix an infinite redirect loop when the visitor token exceeds the browser cookie size limit.
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Fix inline Ask AI buttons opening a configured custom assistant.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep links working when their target page is deleted and re-created at the same path, by falling back to the path recorded on the link.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix ContentKit buttons to size to their content instead of stretching to the full container width.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop the built-in cookie banner from flashing on sites using a consent integration such as Osano or OneTrust.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix breadcrumbs for cross-space page links in grouped sites.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Show the theme toggle in the footer whenever the outline column that hosts the other toggle isn't pinned open, so it stays reachable on laptop-sized screens in wide layouts and while the AI chat is open.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Disable click-to-zoom for inline line sized images.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Give the prompt block a default "Copy prompt" action alongside "Open in Claude", "Open in Codex" and "Open in Cursor", and remember the visitor's last pick across every prompt block.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix host action buttons in the Docs Embed not reaching the assistant.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the Docs Embed widget rendering with a dark surface when the visitor's OS is in dark mode, even on a light page or a site published with a light theme. The embed script now accepts `?theme=light|dark` to force a scheme.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix suggested question clicks in the embed search not opening the assistant.
-5
View File
@@ -1,5 +0,0 @@
---
"@gitbook/embed": patch
---
Make the Docs Embed widget match the page it is embedded in rather than the visitor's OS: a widget on a light page stays light even when the visitor's system is in dark mode, and the widget's own chrome and the docs inside it always render in the same scheme. Sites published with a single theme impose it on the widget too, since they render in it regardless. The standalone script takes `?theme=light` on its URL, and calling `init` twice now updates the options instead of throwing.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": minor
---
Support external links in published site navigation.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Skip internal paths (`~gitbook/*`, `.well-known/oauth-protected-resource`, `llms.txt`, `robots.txt`, `sitemap.xml`, `rss.xml`) when building URL lookup alternatives, to avoid resolving URLs that can never match content.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep published search results within the selected site-space scope during local and remote result fusion.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Only advertise RSS feeds on pages with Updates blocks.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix page link titles showing the site section name instead of the target space title.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Serve Markdown responses as plain text to OpenAI's ChatGPT Search crawler.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Self-host default Google fonts and inline only the @font-face rules of the fonts a site uses, instead of shipping render-blocking stylesheets covering all 23 families on every page.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Hide heading and expandable anchor links on pages whose layout disables anchors (landing pages).
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Hide card fields that render no content, along with their title
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Hide the Intercom launcher while the Assistant panel is open, so it no longer overlaps the message box.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Upgrade react-hotkeys-hook to v5 and use its native `useKey` option so keyboard shortcuts match the produced key on non-QWERTY layouts.
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Keep embed demos and frames on the deployment that served them.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix a hydration mismatch on every page load caused by the AI chat time-based greeting being computed in the server timezone.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop preloading the zoom-modal variant of every zoomable image at render time; it downloaded each image twice during the initial page load. The modal image still loads on hover or click.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Announce pagination at the top of every part of a multi-part llms-full.txt, with absolute links to the previous and next parts.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Serve an indexable `X-Robots-Tag` on markdown pages requested by AI agents
@@ -0,0 +1,5 @@
---
"gitbook": patch
---
Attribute the markdown and ask events tracked from the middleware to their space, and record the goal passed alongside a question.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Bump `@gitbook/api` to 0.199.0, and record a markdown request made from the page actions menu as a page action rather than an agent request.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the page-actions dropdown closing before the "Copied" confirmation could be shown when copying the MCP server URL, an MCP install command, or the page as Markdown.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Mermaid diagrams no longer hijack page scrolling: zooming with the wheel now requires holding Ctrl/Cmd inline, while the fullscreen view keeps free wheel zoom.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Migrate the headless UI primitives from Radix and react-aria to Base UI.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Missing pages with accented or non-Latin characters in the URL now return 404 instead of an endless redirect.
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Redesign the site OAuth consent screen for published sites MCP and translate its strings
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Drop a column instead of shrinking them all when a section group dropdown runs out of room
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Let a section group dropdown scroll when it is taller than the screen
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Skip the rendering work for off-screen OpenAPI blocks, so pages with many operations stay smooth to scroll.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix OpenAPI webhook payload and schema example panels being clipped instead of scrollable.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Move paragraph block styles behind a single `paragraph` class and drop the `page-cover-background:` gate from the cover-contrast text. The gate combined with the per-paragraph `:not(:has(...))` made every DOM insertion re-style all paragraphs, which froze very long pages.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Serve Markdown responses to ChatGPT with a `text/plain` Content-Type for compatibility.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Preserve external page destinations returned by published search.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Use one canonical backend-ranked result set for published searches across site sections.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Preserve canonical backend ranking and present page or section context that matches each published search destination.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Align the Previous page navigation button to the left edge and the Next button to the right edge, including when only one of them is present.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Preserve the full site preview path and query parameters when redirecting users to log in.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix pages resolving to "not found" when a root URL lookup resolves to a custom homepage, by no longer using the homepage pathname as a prefix for the requested page path.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep current-space search results inside revision previews.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Prewarm published search caches when readers open the search interface.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Inject site tracking scripts (analytics integrations) after `load` + idle instead of preloading them and executing them during the critical loading window.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Render horizontal and vertical merged table cells on published pages.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Pass page context to webframes opened from integration modals.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Render a site-space custom home page at its placement root while preserving the full space and normal page URLs.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Apply release notes tag filters from the URL via CSS before first paint, so the filtered entries, the "page contents" section list, and the tag chip highlighting all show correctly from the start on cached pages, with no flash of unfiltered content. Also stop the "page contents" scroll highlight from defaulting to an entry hidden by the filter.
@@ -1,7 +0,0 @@
---
"gitbook": patch
---
Fix analytics and adaptive content silently breaking on sites served from a different host than the one configured (apex vs www, domain alias, CDN). The insights and visitor-claims endpoints are now requested relative to the page's own origin instead of the configured host, which a prerendered page cannot know.
Keep the traffic of GitBook's own preview deployments out of the sites' analytics, now that those requests reach the events endpoint.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Resolve stable page, space and file refs in images, definitions and HTML blocks of published markdown pages, instead of leaking internal `/pages/{id}`, `/spaces/{id}` and `/files/{id}` URLs.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Restore the Next.js dev-mode OOM patch that was silently dropped by the 16.3.6 upgrade (root `package.json`'s `patchedDependencies` still pinned it to the old `16.3.3` patch file, so Bun stopped applying it).
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fail closed in `/~gitbook/revalidate` when `GITBOOK_SECRET` is not configured, returning `403 Revalidation is disabled` instead of skipping the signature check, consistent with `force-revalidate`.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the docs embed not applying `?theme=light`/`?theme=dark`. The theme was dropped when the embed redirected to its default tab, and the embed tabs couldn't read it because they render statically (their request headers are empty). The middleware now threads a forced embed theme through the embed route context (scoped to the embed, not the main site), so the embed tabs honor it while staying statically rendered, and the redirect forwards it to the default tab. The forced theme is also persisted to the embed's own theme storage so it is remembered across tab navigation instead of only applying while the query string is present.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the search field losing focus if it was focused just before the page finished hydrating.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix code block syntax highlighting so comment delimiters (e.g. `//`, `/*`) use the same color as the rest of the comment. Previously the delimiter fell through to the generic punctuation scope, making it a different color from the comment body (most visible in dark mode).
@@ -1,5 +0,0 @@
---
"@gitbook/react-contentkit": patch
---
Show a close button on ContentKit modals rendered on published sites.
@@ -1,7 +0,0 @@
---
"@gitbook/react-contentkit": patch
---
Let ContentKit webframes dispatch the built-in `@ui.*` actions. Actions posted from a webframe were forwarded to the integration as a plain re-render instead of being handled, so `@ui.modal.open`, `@ui.modal.close` and `@ui.url.open` did nothing — most visibly, an integration could not close a modal from inside its own webframe.
Keep `null` values and class instances such as `Date` intact when resolving dynamic bindings in an action, instead of throwing or flattening them to `{}`.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Scroll to the top when selecting a search result for the page already being viewed.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Add end-to-end coverage for root and nested external links in site section navigation.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix section links in search results opening the page without scrolling to the section.
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Allow published search to be scoped to any visible site section.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the spacebar being ignored in the search bar, which made multi-word queries impossible.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep keyboard focus within search while the results are open.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix keyboard focus getting trapped inside the header search popover, allowing Tab/Shift+Tab to exit it as expected.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Show the containing section name when hovering a direct link to a space.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the section group menu dismissing while the mouse is still inside it, when the collapsed sidebar rail overlaps the menu on no-sidebar pages.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Show loose sections in a section group dropdown as secondary links unless the group starts with one
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop the section tabs in the header from showing a scroll button and faded edge when all tabs already fit.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Use cached Git metadata (via @gitbook/api 0.201.0's `cachedMetadata` param) when rendering Edit on Git actions.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the site auth login link sometimes redirecting back to an internal URL after login.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Render headings with the site's heading font when one is configured, falling back to the main font otherwise.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Don't track a page view for 404s on internal `~gitbook` routes, so they no longer appear as broken URLs.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Narrow a table or card grid to the reader's content selection: choosing an option in a tab or a select button now filters any select column that offers it. The table says what it has been narrowed to, and offers a Clear that drops the selection.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the tabs "more" dropdown showing when no tab is overflowing, and stop a tab click re-rendering every tab group on the page.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Let a tab keep its content selection across a rename, by honouring an explicit slug set on the tab instead of always deriving one from its title.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix tabs nested inside another tab group rendering an empty body once a tab in the outer group was selected.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Load the admin toolbar and its CSS lazily so published pages no longer ship a render-blocking stylesheet for admin-only UI.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Remove the gap between the columns of a section group dropdown holding a large group
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Remove the fallback query parameter after successful page navigation without adding a browser history entry.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Restore Edit on Git page actions for Git-synced pages.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the first item of a table-of-contents page group appearing cut off (faded under the group header) after client-side navigation.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Highlight a table-of-contents link entry as active when it points to the page — or the section of a page — you are currently viewing.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix chevrons and open-state styling incorrectly reacting to a tooltip opening on the same trigger, by switching from the shared Base UI `data-popup-open` attribute to `aria-expanded`.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Track Insights link clicks on the Download button of file blocks.

Some files were not shown because too many files have changed in this diff Show More