Skip to content

fix(zoom-html): show business domains in projects organised by type - #61

Merged
alexwrite merged 1 commit into
mainfrom
fix/zoom-domains-by-type
Oct 11, 2026
Merged

alexwrite merged 1 commit into
mainfrom
fix/zoom-domains-by-type

Conversation

@alexwrite

Copy link
Copy Markdown
Owner

Context

Closes #58 on merge. On a Symfony project organised by type (src/Controller/, src/Service/, src/Command/...), level 1 of zoom-html presented type folders as domains (Command, Form, Enum, EventSubscriber, DataFixtures), put 290 classes in "(no domain)" and folded 89 small domains. The business split lives one level lower: src/Service/<Domain>/, src/Controller/<Domain>/.

Fix

  • _TYPE_DIRS: closed list of folder names that framework generators give to a kind of class (Symfony maker, Laravel make:*) plus the layer folders. Never a business domain.
  • detect_layout(class_files, root): by-type when at least half of the classes under the code root sit below a type folder, else by-domain. Exposed as layout in the page data and stated in the level 1 introduction.
  • classify_domain(path, root, layout): by type, the first non-type folder below the root (src/Service/Billing/X.php gives Billing, app/Http/Controllers/Admin/X.php gives Admin); by domain, the first folder unless it is a type folder. No domain folder: the explicit "Common" group (was "(no domain)"), with its own legend entry.
  • Column order unchanged and already as requested: Route (hidden while empty, Framework : ajouter routes, injection et événements depuis l'export du framework #47), Controller, Service, Repository, Entity / Model, View, Other.
  • Level 2 triangle icon glyph raised from 11 to 12 px (no text under 12 px).

Measured on real repositories (--code-only)

Project Before After
Project A, Symfony by type 103 groups; Enum 167, Message 100, DataFixtures 76, Command 71, Form 60 shown as domains; 290 without domain detected by-type; 94 business or module domains (ProbeNetwork, Admin, Retention, Osint, Host, Account, Economy...); Common 1,068
ClientXCMS, Laravel 12 37 groups; Http, DTO, Console, Events, Contracts, Providers as domains detected by-type; 24 domains (Admin, Billing, Core, Store, Provisioning, Helpdesk...); Common 190
Project B, Symfony by domain 5 domains + 1 class without domain unchanged, detected by-domain

Quality (commands actually run, after the last change)

  • uv run pytest tests/test_zoom_html.py -q: 29 passed. Without the change: import error on main; with layout detection forced to by-domain: 2 failed.
  • uv run pytest tests/ -q: 7648 passed, 14 skipped.
  • uv run ruff check .: all checks passed. uv run pyright on the touched files: 0 errors.
  • axe-core 4.10.3 (WCAG 2.0/2.1 A and AA): 0 violations on 3 levels x 2 themes x 3 repositories; keyboard round trip and 320 px checked; no text under 12 px.

Limits

Type folders (Controller, Command, Form, Enum, DataFixtures...) are never
domains; unplaced classes go to an explicit Common group. Refs #58

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thanks for the pull request, @alexwrite. A maintainer will review it soon.

Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions.

A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic.

@alexwrite
alexwrite merged commit ddc3b00 into main Oct 11, 2026
9 checks passed
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.

zoom-html : domaines métier d'un projet rangé par type

1 participant