Skip to content

fix: hide XBRL hypercube scaffolding rows (Table / Line Items) - #19

Merged
jfrench9 merged 1 commit into
mainfrom
bugfix/hide-hypercube-scaffolding-rows
Jul 14, 2026
Merged

jfrench9 merged 1 commit into
mainfrom
bugfix/hide-hypercube-scaffolding-rows

Conversation

@jfrench9

Copy link
Copy Markdown
Member

Summary

Follow-up to #17. Stripping the XBRL role tags from labels (0.2.8) exposed that us-gaap:StatementTable and us-gaap:StatementLineItems render as bare, duplicated "Statement" header rows in the statement body — visible in both the file/holon route and the SEC route (AAPL 10-K and 10-Q). These are pure hypercube plumbing: the [Table] is the hypercube itself and [Line Items] is its container; neither carries facts, and neither is a meaningful heading.

Change

  • In the shared buildPivot row walk, skip emitting a header row for abstract concepts whose local name ends in Table or LineItems, and keep their children at the current depth so the tree doesn't over-indent.
  • The check keys off the concept's local name, which is identical whether elements are keyed by IRI (store/holon route) or qname (SEC route) — so both rendering routes hide the plumbing the same way, via one change at the shared choke point.
  • [Axis] / [Domain] / [Member] / [Abstract] / [Roll Forward] rows are untouched — those carry real names/data.

Before → after (AAPL income statement)

INCOME STATEMENT              INCOME STATEMENT
    STATEMENT          →          Product
        STATEMENT                 Service
            Product               ...
            Service

Verification

  • New buildPivot tests (qname-keyed, mirroring the SEC route): no header row for the plumbing, real header + concepts retained, children promoted to the scaffold's depth rather than over-indented.
  • Verified against the real AAPL FY2023 holon through the store route: 0 scaffold header rows remain in the income statement; members/totals reflow one level up under the section header.
  • Full test:all (format, lint, typecheck, 75 tests, build) passes.

Stripping the role tags exposed that us-gaap:StatementTable and
us-gaap:StatementLineItems render as bare, duplicated 'Statement'
header rows — pure hypercube plumbing that carries no facts and is not
a meaningful heading. Skip these abstracts in the pivot row walk and
keep their children at the current depth so the tree stays flat.

The check keys off the concept's local name (…Table / …LineItems),
which is identical whether elements are keyed by IRI (store/holon
route) or qname (SEC route), so both rendering routes hide them the
same way. Axis/Domain/Member/Abstract/Roll Forward rows are unchanged.
@jfrench9
jfrench9 merged commit 27fff11 into main Jul 14, 2026
1 check passed
@jfrench9
jfrench9 deleted the bugfix/hide-hypercube-scaffolding-rows branch July 14, 2026 18:07
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.

1 participant