Skip to content

fix: rename handlebar helper "date" to "formatDate" - #3873

Merged
knudtty merged 1 commit into
mainfrom
aaron/handlebar-var-name-hotfix
Dec 1, 2026
Merged

knudtty merged 1 commit into
mainfrom
aaron/handlebar-var-name-hotfix

Conversation

@knudtty

@knudtty knudtty commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Renames the "date" helper introduced in #3726 to "formatDate". Should not be a breaking change since no release contains #3726.

References

  • Linear Issue: Closes HDX-5542

Note

Low Risk
Narrow rename of an unreleased template helper with doc and test updates only; no production release reportedly shipped the old name.

Overview
Renames the Handlebars helper used in dashboard row-click and link templates from {{date …}} to {{formatDate …}}, so templates can reference a row column named date via {{date}} without invoking the formatter.

The helper behavior is unchanged (iso, seconds, ms). Call sites and docs are updated across common-utils, OpenAPI/MCP schemas, the onClick drawer help text, and the changeset; tests now use formatDate and cover the {{date}} column case (including series name templates).

Reviewed by Cursor Bugbot for commit a0faa59. Bugbot is set up for automated code reviews on this repo. Configure here.

@knudtty
knudtty requested a review from a team as a code owner December 1, 2026 14:08
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Dec 1, 2026 2:12pm UTC
hyperdx-storybook Ready Ready Preview Dec 1, 2026 2:12pm UTC

Request Review

@github-actions github-actions Bot added the review/tier-3 Standard — full human review required label Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

🟡 Tier 3 — Standard

Introduces new logic, modifies core functionality, or touches areas with non-trivial risk.

Why this tier:

  • Touches API routes or data models — hidden complexity risk

Additional context: grazes a critical path (2 lines in packages/api/src/routers/external-api/v2/dashboards.ts) inside a 12-line PR, so it is tiered on size, spans packages but only 12 prod lines — under the 100-line cross-layer bar

Review process: Full human review — logic, architecture, edge cases.
SLA: First-pass feedback within 1 business day.

Stats
  • Production files changed: 6
  • Production lines changed: 12 (+ 24 in test files, excluded from tier calculation)
  • Branch: aaron/handlebar-var-name-hotfix
  • Author: knudtty

To override this classification, remove the review/tier-3 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 109 in total (1.10%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

PR Review

✅ No issues found.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Deep Review

✅ No critical issues found.

This PR renames the Handlebars helper date → formatDate across the implementation, OpenAPI spec, external-API JSDoc, MCP tool schema and prompt, app UI help text, changeset, and tests. The rename is complete and uniform — no lingering registerHelper('date') or {{date <args>}} references remain, and the remaining 'date' hits in the repo are unrelated (ClickHouse type kinds, column names, a separate formatDate SQL utility). The motivating behavior (a clicked-row column named date now resolves as a variable instead of being shadowed by the helper) is covered by two new tests, and the formatDate identifier collides with no other registered helper. Nothing blocks merge.


Reviewers (8): correctness, testing, maintainability, project-standards, api-contract, kieran-typescript, agent-native, learnings-researcher.

Testing gaps:

  • testing No case asserts the breaking side of the rename — an old 2-arg {{date __from "iso"}} invocation now routes through helperMissing and throws UnknownTemplateHelperError rather than formatting. Low value, since the main new behavior (bare {{date}} as a variable) is covered; add one assertion if documenting the breaking edge is desired.
  • api-contract No migration/back-compat test for a pre-existing stored urlTemplate containing {{date ...}}. Acceptable: the date helper shipped only in unreleased PR feat: more global vars for dashboard links #3726 (changeset still pending, absent from all CHANGELOGs), so no released config is affected — confirm that remains true before release.

Note: packages/api/openapi.json is a generated artifact (yarn docgen from the route JSDoc). The source JSDoc and committed spec were edited identically so they appear in sync, but this was not confirmed by running the generator — make ci-openapi should pass in CI to rule out drift.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 485 passed • 1 skipped • 1207s

Status Count
✅ Passed 485
❌ Failed 0
⚠️ Flaky 11
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

@knudtty
knudtty merged commit 08cec6a into main Dec 1, 2026
33 of 35 checks passed

This branch was successfully deployed

2 active deployments
Preview – hyperdx-oss — a0faa592 Deployed Dec 1, 2026 by vercel[bot]
Preview – hyperdx-storybook — a0faa592 Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review/tier-3 Standard — full human review required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants