Skip to content

Replace tunnel-rat with a portal - #3444

Merged
david-crespo merged 1 commit into
mainfrom
replace-tunnel-rat
Nov 11, 2026
Merged

david-crespo merged 1 commit into
mainfrom
replace-tunnel-rat

Conversation

@david-crespo

Copy link
Copy Markdown
Collaborator

tunnel-rat is how pagination and full-page form buttons get into the sticky footer of ContentPane. It hasn't had a release since 2023 and it installs its own copy of zustand 4 next to our zustand 5. It was written to move elements between React renderers, which we don't need: we only have one renderer, so createPortal is sufficient. This PR replaces the tunnel with a PageFooter component that portals its children into the footer element, which ContentPane registers in a small zustand store through a ref callback.

Why it's better:

  • Footer content is rendered once, in place. tunnel-rat copied each source's children into a store in a layout effect on every render of the page and rendered them again from the store.
  • One fewer dependency, no second zustand, and less code.

Potential issues and why they don't matter:

  • tunnel-rat kept multiple sources in a defined order. Portals append in mount order. But we don't care because only one thing is ever in the footer at a time: FullPageForm is the only user of page actions, and no full-page form has a paginated table.
  • React events from footer content now bubble through the page's tree before reaching ContentPane. No page has a handler on an element around its table or form buttons, so nothing changes.

Added an e2e test that navigates from the projects list into a project, to the instance create form, and back, checking that the footer shows pagination, then the form buttons, then pagination again.

@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Nov 11, 2026 9:56pm UTC

Request Review

@david-crespo david-crespo assigned Copilot and unassigned Copilot Nov 11, 2026
@david-crespo
david-crespo enabled auto-merge (squash) November 11, 2026 21:58
@david-crespo
david-crespo merged commit a67b168 into main Nov 11, 2026
9 checks passed
@david-crespo
david-crespo deleted the replace-tunnel-rat branch November 11, 2026 22:11

This branch was successfully deployed

1 active deployment
Preview — 72dc0967 Deployed Nov 11, 2026 by vercel[bot]
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