Description
After creating a new API token, the global side navigation is rendered twice — two sidebars appear side by side.
Steps to reproduce
- Go to Tokens.
- Create a new token.
- Observe the page after the create action completes.
Expected
One global side navbar, unchanged by the token creation.
Actual
Two global side navbars render side by side.
Investigation so far
The original guess (an htmx swap nesting a full page inside the layout) is disproven for this flow. Verified against source:
internal/server/templates/tokens.html:13— the create form is a plain<form method="post" action="/tokens">. The file contains zerohx-attributes.internal/server/templates/shell_sidebar.html:71— the Tokens entry is a plain<a href="/tokens">, nothx-get/hx-targetlike the other sidebar links.internal/server/ui_account_pages.go:103uiCreateToken→renderUITokens(:143) →renderUIShell, which renders the fullshelltemplate. Correct for a normal browser POST: the browser replaces the whole document, producing one sidebar.- No
hx-boostanywhere, so the plain form is not ajaxified. internal/server/static/service-worker.jsis push-only with nofetchhandler, andpreload.jsonly sets a sidebar-collapsed attribute. Neither can duplicate the shell.
So the duplication is real but not yet explained by the token-create path itself. The nesting mechanism does exist elsewhere — #main (templates/shell_main.html:2) is a sibling of the sidebar inside .app-shell (templates/shell.html:24-27), so any full-page response swapped into #main renders two sidebars side by side. See the related login-redirect bug for a confirmed instance.
Next step
Needs repro detail: browser, and whether the page was reached by a direct navigation or via browser back/forward (htmx history cache restores a body snapshot and is the leading remaining suspect). A screenshot and the HTML of .app-shell at the time would settle it.
Sub-issues
0Linked issues
0GitHub
0No branches or pull requests linked.