Skip to content

Code Health: raise Components files to 9.5 #506

Closed

Description

@woksin

Raise Code Health of the Components files below 9.5 without behavior or public API changes. Scores measured on main 5f29a4b (commits over 90 days). New files aim for 10; no file may decline.

Added by the Designsystemet adapter work

Files touched while adding Designsystemet support (#530, #531) that could not reach 9.5 in that change. Scores measured on main fd5e1d5.

Acceptance criteria

  • Each listed file scores at least 9.5, or the reason it cannot without a public API change is recorded and moved to a next-major issue.
  • No touched file declines; new files score 10.
  • Characterization specs cover the behavior of each restructured component before it changes.
  • Exported components, props and hooks keep their signatures; rendered output and interactions are unchanged.
  • Lint, compile, specs and the Storybook build pass.

Status

State: In review — Batch 6: manifest generator and renderer matrix scope to 10; adapter index files already 10. Remaining: runConformance, slotProfiles, Designsystemet choice/fields.
Branch: l163/506-uplift-b6 (#555, #561)
Scope: Characterization specs then behavior-preserving refactors, worst files first, in batches.
Plan: Conformance first behind a whole-report characterization spec (check order, ids, statuses, messages), then verbatim moves into internal modules and complexity cuts (context object, checkSlot split into ordered stages, helper factories); adapter choice/button files get DOM characterization specs before their splits. Per-package ci plus renderer adapter matrix as the gate.
Delivered: Nothing yet.
Remaining: To be confirmed.
Follow-ups: None.

Activity

  1. self-assigned this
    on Nov 11, 2026
  2. added a commit that references this issue on Nov 11, 2026
  3. woksin commented on Nov 14, 2026

    @woksin
    ContributorAuthor

    Unfinished work for this issue from a retired local worktree is preserved on branch components-506-code-health-b2 (head 677e455323). No PR was opened; pick it up from that branch if it is still useful.

  4. woksin commented on Nov 15, 2026

    @woksin
    ContributorAuthor

    Unfinished work for this issue is on branch l155/comp-codehealth (pushed, no PR yet): Code Health refactors and specifications for TypeCell, ColumnFilterMenu, ChatSidebar, DialogImplementation and SchemaEditor. The local worktree was removed during cleanup.

  5. woksin commented on Nov 15, 2026

    @woksin
    ContributorAuthor

    Add Source/PivotViewer/usePivotStage.ts: Code Health 8.46 before, 8.48 after #515 (a scoped bug fix; the refactor to 9.5 was too large for that change).

  6. added 2 commits that reference this issue on Nov 16, 2026
  7. woksin commented on Nov 16, 2026

    @woksin
    ContributorAuthor

    Proactive Code Health uplift is paused by maintainer direction: files are raised only when planned work touches them.

    Batches 1–3 shipped in #521 and #522. A fourth batch (ChipsField, PasswordField, Toaster, EventsView, ChatTopicList, FilterPanel and PivotViewer, all now at 9.5 or above) is finished and pushed to the branch l135/comp-codehealth-b4 without a pull request, so it can be picked up later if wanted.

  8. added a commit that references this issue on Nov 16, 2026
  9. woksin commented on Nov 16, 2026

    @woksin
    ContributorAuthor

    Batch 4 shipped in #523: ChipsField (10), PasswordField (9.68), Toaster (9.52), EventsView (10), ChatTopicList (9.66), FilterPanel (9.68) and PivotViewer (10), with no behavior or public API change.

    Shipped so far for this issue: #507, #521, #522 and #523. The issue stays paused: proactive uplift is stopped by maintainer direction, and the remaining files are raised only when planned work touches them.

  10. woksin commented on Nov 18, 2026

    @woksin
    ContributorAuthor

    Touched by #528 without decline, still below 9.5 (button slot renderers in the adapter entry files):

    • Adapters/Mui/src/index.tsx: 6.22
    • Adapters/PrimeReact/src/index.tsx: 6.50
    • Adapters/PrimeReact10/src/index.tsx: 6.28
  11. woksin commented on Nov 19, 2026

    @woksin
    ContributorAuthor

    Add Adapters/Mui/src/index.tsx (Code Health 6.22, measured while adding the MUI common.tooltip slot for #541; the file was already large before that change).

  12. woksin commented on Nov 21, 2026

    @woksin
    ContributorAuthor

    Batches 6 and 7 are merged (#561, #562). Code Health now:

    Remaining: Conformance/src/runConformance.tsx is the only listed file still below 9.5; its remaining finding is the runner's aggregate complexity.

  13. woksin commented on Nov 21, 2026

    @woksin
    ContributorAuthor

    The DataTable mobile card layout (#563) touched three files that were already below 9.5 on main. Their scores did not change:

    • Source/DataTables/DataTableRow.tsx: 9.38
    • Source/DataTables/DataTableForQuery.stories.tsx: 9.04
    • Source/DataTables/DataTableForObservableQuery.stories.tsx: 9.38

    All three are held back by branch-heavy methods. They join Conformance/src/runConformance.tsx on the remaining uplift list.

  14. woksin commented on Nov 21, 2026

    @woksin
    ContributorAuthor

    Batch 8 is merged (#565), and with it every file on this list is at 9.5 or higher:

    The unticked items above are also delivered: Conformance/src/internal/slotProfiles.tsx 8.54 → 10, Adapters/Designsystemet/src/choice.tsx 8.60 → 10 and Adapters/Designsystemet/src/fields.tsx 8.97 → 10, all in #562. No public API, rendered output or story changes; characterization specs cover each restructured file. Closing as complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions