Skip to content

fix(reports): align usage dates with activity cells - #45

Merged
phodal merged 1 commit into
QoderAI:mainfrom
sxyseo:fix/html-usage-date-alignment
Aug 1, 2026
Merged

fix(reports): align usage dates with activity cells#45
phodal merged 1 commit into
QoderAI:mainfrom
sxyseo:fix/html-usage-date-alignment

Conversation

@sxyseo

@sxyseo sxyseo commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • render retained UTC activity dates as one horizontal daily grid
  • bind activity cells and date ticks to the same columns, with sparse long-range ticks and chart-local scrolling
  • preserve heat levels, tooltips, accessibility labels, report data, Markdown, and Canvas behavior
  • document the HTML contract and add short-range, long-range, empty, localized, and self-contained regression coverage

Validation

  • node --test --test-name-pattern="HTML activity chart" test/harness-report-render-cli.test.mjs (3/3 passed)
  • canonical current-report render validation (output location, artifact set, findings JSON, and HTML report all passed)
  • Playwright at 1180 px, 800 px, and 320 px (matching columns, zero short-range center delta, no page overflow, console clean)
  • 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 local EPERM)

Environment note

npm run preview could not start locally because no Canvas SDK runtime is installed or configured. No fake runtime was substituted; CI can exercise the supported runtime path.

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-column positions 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.

@phodal
phodal merged commit e03d4d5 into QoderAI:main Aug 1, 2026
4 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.

3 participants