fix(reports): align usage dates with activity cells - #45
Merged
Conversation
Render usage activity as one horizontal UTC date grid with shared cell and tick columns, bounded long-range ticks, and chart-local scrolling. Add regression coverage for short, long, empty, and localized cases. The implementation follows docs/specs/2026-08-01-html-usage-activity-date-alignment.md. Validation covered focused activity tests, canonical report rendering, Playwright at 1180/800/320, doc-link checks, and package verification. The full suite reached 1044 passes; four Windows symlink fixtures remain blocked by EPERM. Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the HTML report renderer so usage-activity dates (tick labels) are horizontally aligned with their corresponding activity cells using a shared grid-column system, while keeping the report self-contained and preserving existing activity semantics (heat levels, tooltips, aria-labels, and data schema). It also adds renderer-level regression tests and documents the HTML contract expectations for the activity chart.
Changes:
- Update HTML activity chart rendering to bind cells and ticks to the same explicit
grid-columnpositions and move overflow scrolling inside the chart container. - Add deterministic long-range tick selection (
activityTickIndexes) for sparse labeling while preserving short-range per-day labeling. - Add focused test coverage for short-range, long-range, empty, localized, accessibility, and self-contained HTML output, plus spec/docs updates describing the contract.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/harness-report-render-cli.test.mjs | Adds targeted regression tests asserting cell/tick column binding, sparse tick selection, empty/localized output, and self-contained HTML constraints. |
| templates/reporting/html-visual.md | Documents the HTML contract for left-to-right UTC date rendering and shared grid-column alignment with chart-local scrolling. |
| scripts/harness-analysis/renderers/html.mjs | Implements shared column-based layout (data-date, grid-column styles), sparse tick logic, and chart-local scroll container/CSS. |
| docs/specs/2026-08-01-html-usage-activity-date-alignment.md | Adds a spec with acceptance scenarios and recorded test/validation evidence for the activity-date alignment change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
node --test --test-name-pattern="HTML activity chart" test/harness-report-render-cli.test.mjs(3/3 passed)node --test test/doc-link-graph.test.mjs(6/6 passed)npm run pack:verify(npm 369 entries, runtime zip 392 entries)npm test(1044 passed, 6 skipped; 4 Windows symlink fixtures blocked by localEPERM)Environment note
npm run previewcould not start locally because no Canvas SDK runtime is installed or configured. No fake runtime was substituted; CI can exercise the supported runtime path.