Skip to content

split(pm-stack): render.ts (8,515 lines) under the production line limit (#12671) #13051

Open

Description

@dezren39

Split pm-stack/aggregator/src/render.ts under the production line limit

pm-stack/aggregator/src/render.ts is 8,515 lines (measured on main, 2026-11-23) — the largest PM-stack TypeScript file. It is pure HTML rendering for every aggregator view (charts, tables, filters, boards).

It is grandfathered in .github/scripts/check-production-line-limit.sh (limit 2500 production lines, extended to pm-stack TypeScript under #12671). Per the guard's convention, this issue is the one that removes its grandfather entry: the entry is deleted in the same PR that lands the split.

Suggested shape (from #12671)

Split by view — for example charts, tables, filters, boards — behind the existing renderX exports, so callers keep importing the same names. Each resulting file must be under 2500 lines and covered by the existing aggregator test suites.

Done when

  • render.ts (or its successor modules) are each under the 2500-line guard limit.
  • The pm-stack/aggregator/src/render.ts grandfather entry is removed from the guard script in the same PR.
  • Aggregator suites pass; rendered output unchanged.

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Pickup — xaltha lane taking this split. Branch xaltha/13051-split-render-ts pushed from current main; splitting pm-stack/aggregator/src/render.ts (8,515 lines) by view behind the existing renderX exports, no behavior change, and removing its grandfather entry from .github/scripts/check-production-line-limit.sh in the same PR per the guard convention. Staying strictly inside render.ts and its own imports (sibling lane has server.ts / #13052).

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Split landed as PR #13089 (Closes #13051).

    Module map — render.ts is now a 118-line barrel re-exporting every public name (callers unchanged); bodies moved verbatim:

    • render-core.ts (1,461) — shared primitives: esc/fmt/relTime, layout + nav + search, script consts, comment/action forms, needs-user + session helpers, coverage strip, item briefs
    • render-board.ts (759) — board, roadmap, item detail
    • render-quota.ts (720) — quota view, usage/billing cards, service detail, history charts
    • render-attention.ts (828) — attention view, needs-Drew census
    • render-today.ts (566) — today, queue, overview
    • render-dns.ts (101) — DNS register
    • render-aa.ts (2,020) — AA cost explorer + inline explorer script
    • render-views.ts (493) — sessions, conflicts, pages, health, discuss, comments queue
    • render-program.ts (1,235) — projects, program, epic graph, phase panels
    • render-alerts.ts (562) — alerts, notification preferences, notifications, digest

    Import graph is a DAG (everything → core; attention/today → quota for the shared card helpers; views → board; program → board + views). The grandfather entry is removed from check-production-line-limit.sh in the same PR.

    Evidence (full detail in the PR body): module bodies verified line-for-line against the original; render-touching suites (75 files) show zero deterministic failures before or after — the only failures in both runs are the sandbox's missing-web-push server-boot flake, proven split-independent; the six source-scanning test files were re-pointed at the render module set (assertions unchanged) and pass 61/61; differential typecheck of the render graph vs pristine HEAD is identical with zero errors in render files; the guard's only delta vs HEAD is the render.ts warning gone, and its contract tests pass.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions