Repository navigation
popup: fix and improve the overlay, popup and panel shell from the October 2026 audit #326
Copy link
Copy link
Closed as duplicate
Closed as duplicate
Copy link
Labels
bugSomething is broken or shows wrong dataSomething is broken or shows wrong datafeatureA feature request or a pull request that adds oneA feature request or a pull request that adds one
Description
Context
This comes from a code audit of the overlay, popup and panel shell, done during a comparison with other devtools in October 2026. Roadmap items live in #310, #311, #312 and #313. Items marked (to confirm) were not reproduced.
Problems
Medium
- No retry after a failed first connection:
connectDevframeruns once, and on rejection the panel setsconnectionFailedand asks the user to reload. A dev server that starts slowly or restarts needs a manual reload. Retry with backoff (1, 2, 5, 10 s) whileconnectionFailedis set and add a "Retry now" button. The popup'sfindTargetalso only retries on the next open (app/src/app.ts:913-947,app/src/app.ts:372-375,packages/devtools/src/popup.ts:114-121).
Low
- Popup accepts theme messages from any window:
onThemeMessageonly rejectse.source === window, so any iframe or script on the host page can flip the popup theme, and the value is saved tolocalStorage. Accept the message only fromiframe.contentWindow(or a frame inside it) with a matching origin (packages/devtools/src/popup.ts:827-832). - Theme posted to every ancestor with
'*':ThemeServicewalkswindow.parentand postspangular:theme-changewith target origin'*', which leaks to unknown origins when the panel is embedded cross-origin. Post to the parent's origin (fromdocument.referrerorancestorOrigins), or rely on theBroadcastChannelfor same-origin cases (app/src/theme.service.ts:36-47). - Tab strip is not a tablist: the inspector tabs are buttons with
aria-current="page", with no roving tabindex or arrow keys, so ten tabs are ten tab stops before the content. Userole=tablist/tab/tabpanelwitharia-selectedand roving tabindex, or keep the nav pattern and add arrow-key handling (app/src/app.ts:346-358). - Opening the panel leaves focus on the FAB:
togglePanelonly moves focus on close. When opened from the keyboard (clickwithdetail === 0), focus the iframe or itsmainonce loaded (packages/devtools/src/popup.ts:670-675). - Hub views listed twice:
HUB_VIEWSis defined in both the panel and the package, and thepangular:dock prefix is repeated too. Adding a dock in one place breaksfollowHubDocksand view titles silently. ExportHUB_VIEWSanddockIdfrom one module and import them in the app (app/src/app.ts:43-50,packages/devtools/src/hub-docks.ts:9-16,packages/devtools/src/hub-docks.ts:48,app/src/hub-dock-sync.ts:2,app/src/app.ts:1088). - Overlay and popup probe different bases: the overlay tries
['./', '/__pangular/', '/__devframes/pangular/']and the popup tries['/__pangular/', '/__devframes/pangular/', '/__devframe/', '/'], so one can find a server the other misses. Keep one exported list inpanel-frame.tsand use it in both (packages/devtools/src/overlay.ts:177,packages/devtools/src/popup.ts:61). - Untyped
hub:docks:activatecall: the fallback dock switch casts the RPC clientas unknownand callshub:docks:activate. If the client has no top-levelcall, the panel quietly switches to the fallback tab instead of the dock. Use the typed hub client API and add a test that the hub path activates the dock (app/src/app.ts:1073-1094) (to confirm). - Short page id: the page id is 4 base36 characters from
Math.random, and theBroadcastChannelclaim only catches collisions inside one browser. Pages from other devices (NativeScript, Angular Native, a phone) reporting to one hub can collide. Usecrypto.randomUUID().slice(0, 8)or longer, staying under the server's 50-character limit (packages/devtools/src/overlay.ts:96,packages/devtools/src/devframe.ts:272).
Improvements
- Move
limits,redaction,refreshMsand the action toggles from config-file-only toctx.settings, with a Settings view in the panel (packages/devtools/src/config.ts,packages/devtools/src/devframe.ts,app/src/app.ts). - Export a programmatic
buildReport()next to the CLIbuild, so CI and Analog/Vite builds can produce the static report without the CLI wrapper (packages/devtools/src/cli.ts,packages/devtools/package.json). - Remember scroll position and selection per tab, not only the tab id, in
sessionStoragekeyed bypageId, so a popup or extension reload returns to the same item (app/src/tab-memory.ts,app/src/app.ts). - A minimized "pill" launcher that shows the render count and error count on the FAB (
packages/devtools/src/popup.ts).
Already tracked elsewhere
- Command palette, Cmd/Ctrl+K and a global popup shortcut: phase 3 of 4: a devframe shell as good as Vue and Nuxt DevTools #312
- Splitter for the docked popup (fixed
40vh/40vwtoday) and pop-out window: phase 3 of 4: a devframe shell as good as Vue and Nuxt DevTools #312 - Theme toggle in the panel (settings page): phase 3 of 4: a devframe shell as good as Vue and Nuxt DevTools #312
- Deep links to an item (
#tab=&id=&page=) and anopen-in-panelagent tool: phase 3 of 4: a devframe shell as good as Vue and Nuxt DevTools #312 - Cross-inspector search from the palette: phase 3 of 4: a devframe shell as good as Vue and Nuxt DevTools #312
- Terminals dock (including the Analog server log): phase 3 of 4: a devframe shell as good as Vue and Nuxt DevTools #312
- Delta pushes instead of polling for heavy timelines: phase 3 of 4: a devframe shell as good as Vue and Nuxt DevTools #312
- Hub messages for agent writes and NG errors, and dock badges: phase 1 of 4: safe by default, open in editor and cheap shell wins #310
- Component-picker shortcut and open in editor: phase 1 of 4: safe by default, open in editor and cheap shell wins #310
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething is broken or shows wrong dataSomething is broken or shows wrong datafeatureA feature request or a pull request that adds oneA feature request or a pull request that adds one
Activity