Skip to content

refactor(ui): split the six large panel pages, with templates and styles in own files - #498

Merged
erkamyaman merged 18 commits into
mainfrom
refactor/split-panel-pages
Nov 8, 2026
Merged

erkamyaman merged 18 commits into
mainfrom
refactor/split-panel-pages

Conversation

@erkamyaman

Copy link
Copy Markdown
Member

Splits the last six panel pages that were over the 1,500-line limit. Every component involved now keeps its template and styles in separate .html and .scss files, including the network page split in #495. This is a pure move: RPC calls, data shapes, labels, ARIA, keyboard behaviour and styles stay the same.

Pages

Tab Page file before → after New folder
Components 2,981 → 332 pages/components/
Store 2,870 → 185 pages/store/
Analog 2,742 → 103 pages/analog/
Injectors 2,741 → 274 pages/injectors/
Signals 2,514 → 149 pages/signals/
Pipes 1,606 → 161 pages/pipes/
SSR & HTTP 163 (templates moved out) pages/network/

Each page follows the #495 pattern:

  • Each section is a component that attaches to the page's existing element (section[appX]).
  • State the sections share lives in services the page provides.
  • Styles shared between sections are SCSS mixins in app/src/styles/_<area>.scss, included in the original rule order.
  • The page keeps every member app.ts and the tests use, as thin delegates.
  • Every new file is under 650 lines, and no file in app/src/pages is over 1,100 any more.

Separate template and style files

  • Components: all use templateUrl: './x.html' and styleUrl: './x.scss', with no inline template: or styles:.
  • Angular rules: .claude/rules/angular.md now says to use separate files instead of preferring inline templates.
  • Contributing docs: the guide (contributing/development.md) says the same.
  • Package tests: these render panel pages in JIT and can't load external files. A small test-only Vite plugin (packages/devtools/src/__tests__/inline-resources.ts, registered in vitest.config.ts) inlines templateUrl and styleUrl for app/src files.
  • Convention tests: page-conventions.test.ts and tint-contrast.test.ts read each .ts together with its sibling .html and .scss. No assertion was weakened.

Behaviour checks

Each page was built before and after and compared in a real browser at 1280px dark and light and at 360px, with seeded data.

  • DOM: identical apart from the section marker attributes and whitespace that Prettier reflowed.
  • Screenshots: match, apart from anti-aliasing noise that also shows up between two runs of the unchanged build.
  • Axe: 0 violations, with no horizontal scroll at 360px.
  • Analog animation: the Analog view panel stays one element across view switches, so its enter animation doesn't replay.

Checks

  • pnpm test:panel: 1,095 passed, 1 skipped
  • pnpm test:devtools: 4,470 passed, 4 skipped
  • pnpm test:axe: every view ok
  • pnpm typecheck: 0 errors
  • pnpm lint: no new warnings; the baseline drops the six max-lines entries
  • pnpm format:check, pnpm docs:build, pnpm skills:check, pnpm commit:check: passed
  • extension/ui is rebuilt and committed last

Under heavy machine load a few package tests near their 5 s limit (cd-record-hints, audit-tools, native-page-tools) timed out in individual agent runs. They pass on their own and in the combined run.


Generated by Claude Code

erkamyaman and others added 17 commits November 8, 2026 11:33
Move the Pipes tab into app/src/pages/pipes/: a PipesState service the
page provides, a model file, and the list, detail, async subscriptions
and lint sections as components that attach to the page's existing
elements, so the DOM stays the same. Every component keeps its template
and styles in .html and .scss files next to it; shared styles are
mixins in app/src/styles/_pipes.scss, in the page's old rule order.

The page conventions test now reads the pages' .html templates too.
…wn files

Components keep their markup and styles in separate .html and .scss files next to the .ts file, so the network page shell and its section components now use templateUrl and styleUrl. The content moves unchanged. The package JIT tests inline those files through a small Vite plugin, and the page convention test reads a component's template and style files with its source.
Move the Routes, Server, Render, Content and Lint views of the Analog
tab into app/src/pages/analog/. Each view attaches to its own tabpanel
div, so the DOM stays the same. Shared state lives in AnalogPageState
and AnalogCallsState, provided by the page, and the page keeps the
members its tests read as delegates. The page styles move into mixins
in _analog.scss, in their original order.

Every component in the split keeps its template and styles in separate
.html and .scss files. Package JIT tests inline them with the shared
inline-resources plugin, and the page source checks read the sibling
files.
The split rendered a new tab panel per view, so its enter animation
replayed on every switch. The page now keeps one tab panel, as before
the split, and each view attaches to a wrapper inside it whose host is
display: contents, so its parts stay items of the panel grid. Data and
Runtime render straight in the panel again.
…into refactor/split-panel-pages

# Conflicts:
#	app/src/__tests__/page-conventions.test.ts
The Components tab was one 2,980 line component. Its tree, directive host
detail, component detail and source list are now section components in
app/src/pages/components/ that attach to the page's existing elements, so
the DOM stays the same. The shared state lives in TreeState, PickState,
SourceScan and DetailState, which the page provides, and the styles shared
between sections are mixins in app/src/styles/_components.scss in their
original order. Every component keeps its template and styles in .html and
.scss files next to it. The page still has the members the app and the
tests read.
The Signals page was one 2,500 line component. Its graph, watched list,
source scan list, resource and signal lists and the detail panel now live
in app/src/pages/signals/ as components with their own template and style
files, attached to the elements the page already had, so the DOM, labels
and behaviour do not change. The shared state is in SignalState and
SignalDetailState, which the page provides, and the shared styles are
mixins in _signals.scss in their original order.

The page convention and token checks read each component's template and
style files with its source, and the package tests inline templateUrl and
styleUrl for panel components rendered in JIT.
… into refactor/split-panel-pages

# Conflicts:
#	app/src/__tests__/tint-contrast.test.ts
Move the Store tab out of one 2,870-line file into app/src/pages/store/:
StoreState and StoreActions services the page provides, and section
components for the live stores, store detail, log, entry detail, Store
DevTools history, stats, dispatch, events and source declarations. Each
section attaches to the page's existing element, so the DOM is unchanged.
Every component keeps its template and styles in .html and .scss files
next to it, and the shared styles are mixins in _store.scss in their old
order.

The package JIT tests inline templateUrl and styleUrl with the shared
Vite plugin, and the page convention checks read each component's
template and style files with its source.
The Injectors page moves into app/src/pages/injectors/: the tree, the
selected injector's detail with its injected and provided blocks, the
gone injector, the never-injected hint and the source scan list. They
share the InjectorsState and SourceScan services the page provides, and
their styles are mixins in app/src/styles/_injectors.scss. Every
component, the page included, uses templateUrl and styleUrl. The DOM,
labels, keys and RPC calls stay the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeSKq1utVUofyf3af3AnoW
The split pages put each template and stylesheet next to its component.
The Angular rules and the contributing guide now say so, and the lint
baseline drops the max-lines entries of the split pages.
@github-actions github-actions Bot added area: panel The devtools panel app (app/) area: package The ng-devtools package (packages/ng-devtools) area: extension The Chrome extension area: docs The documentation site area: ci Workflows, hooks and repository tooling labels Nov 8, 2026
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
8b97ad7 2026-11-08T15:06:21.821Z View logs ↗
  • Build: Failed ❌

View logs ↗
3db8497 2026-11-08T14:58:21.460Z View logs ↗

@nx-cloud

nx-cloud Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 3db8497

Command Status Duration Result
nx affected -t test build ✅ Succeeded 3m 9s View ↗
nx build --configuration development ✅ Succeeded 1m 31s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-11-08 15:07:49 UTC

Copy link
Copy Markdown
Member Author

"Workers Builds: angular-devtools" is the Cloudflare preview build. It fails on every pull request in this repository, including docs-only ones, so this PR didn't cause it. It isn't one of the repository's GitHub Actions checks, and I can't re-run it from here. No fix exists yet. The project's own checks are the ones this PR is judged on.


Generated by Claude Code

Vite gives module ids with forward slashes on Windows, while the plugin
compared them with a backslash path, so no panel file matched and the
JIT tests failed with 'Component is not resolved'. Both sides are now
compared with forward slashes, and case-insensitively on Windows.
@erkamyaman
erkamyaman merged commit 7168adc into main Nov 8, 2026
12 of 14 checks passed
@erkamyaman
erkamyaman deleted the refactor/split-panel-pages branch November 8, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci Workflows, hooks and repository tooling area: docs The documentation site area: extension The Chrome extension area: package The ng-devtools package (packages/ng-devtools) area: panel The devtools panel app (app/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant