Skip to content

Validate iOS Safari SPA-nav logo fix on docs site#30

Closed
tony wants to merge 2 commits intomainfrom
try/spa-nav-ios-fix
Closed

Validate iOS Safari SPA-nav logo fix on docs site#30
tony wants to merge 2 commits intomainfrom
try/spa-nav-ios-fix

Conversation

@tony
Copy link
Copy Markdown
Member

@tony tony commented Apr 28, 2026

Summary

  • Pin gp-sphinx and sphinx-gp-theme (and transitive workspace siblings) at unreleased gp-sphinx ref 652ce020 on branch fix/spa-nav-ios-relative-urls. The fix reorders pushState above swap(doc) in spa-nav.js so relative href/src in the swapped DOM resolve against the new baseURI.
  • Temporarily add this branch to the docs workflow trigger so the rebuilt site at https://libtmux-mcp.git-pull.com serves the patched theme.

Background

On iPad Safari (landscape, or "Request Desktop Site" — viewport ≥ 63em where Furo's sidebar drawer is on-screen), the sidebar logo blanks after every cross-depth SPA navigation. Sphinx emits page-relative logo paths (e.g. _static/img/libtmux.svg on root, ../_static/img/libtmux.svg on /api/), and the previous order ran swap(doc) before history.pushState, so setAttribute("src", …) resolved the new path against the old document.baseURI and produced a 404 on the wrong directory.

Chromium and Gecko queue <img src> resolution as an element task and read baseURI after pushState runs on the same call stack, so they tolerate the bug. WebKit on iOS resolves eagerly at setAttribute time, and inside document.startViewTransition the failed-load state is then committed into the new snapshot during the 150ms cross-fade.

Test plan

  • Wait for the docs workflow to deploy this branch.
  • On an iPad Safari (landscape, viewport ≥ 1008px so the sidebar drawer is on-screen), open https://libtmux-mcp.git-pull.com/ and click an internal link that crosses directory depth (e.g. root → /api/, /installation//).
  • Confirm the sidebar logo persists across the cross-fade transition (before this fix, it blanks).
  • Repro on Chromium DevTools at 1024×768 with Network filter on _static/img/libtmux.svg — no 404 entries during cross-depth nav.

Follow-ups (not in this PR)

tony added 2 commits April 27, 2026 19:52
why: Validate the upstream gp-sphinx fix end-to-end on the published
docs site before 0.0.1a12 ships. The fix reorders pushState above
swap(doc) in spa-nav.js so relative href/src in the swapped DOM
resolve against the new baseURI; without it, iPad Safari (in
landscape or with "Request Desktop Site") blanks the sidebar logo
after every cross-depth SPA navigation.

what:
- Add [tool.uv.sources] overrides pinning gp-sphinx and
  sphinx-gp-theme to git ref 652ce020 on
  fix/spa-nav-ios-relative-urls.
- Refresh uv.lock; transitive workspace siblings
  (sphinx-autodoc-typehints-gp, sphinx-fonts, sphinx-gp-opengraph,
  sphinx-gp-sitemap) follow the same git ref automatically.
- Temporary; revert this block once gp-sphinx 0.0.1a12 is on PyPI.
why: Trigger the docs deploy on this branch so the rebuilt site at
libtmux-mcp.git-pull.com runs the patched spa-nav.js and we can
confirm the iPad sidebar-logo regression is gone.

what:
- Add try/spa-nav-ios-fix to the docs.yml push trigger.
- Drop this commit before merging once verified.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.77%. Comparing base (669fbc2) to head (ba1e5a9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #30   +/-   ##
=======================================
  Coverage   83.77%   83.77%           
=======================================
  Files          40       40           
  Lines        2132     2132           
  Branches      270      270           
=======================================
  Hits         1786     1786           
  Misses        266      266           
  Partials       80       80           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony tony closed this Apr 28, 2026
@tony tony deleted the try/spa-nav-ios-fix branch April 28, 2026 01:08
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.

2 participants