Skip to content

Centralize ParseJSON time display formatters (#228) - #264

Merged
Fujio-Turner merged 1 commit into
release-4.0.0-betafrom
fix/issue-228
Sep 15, 2026
Merged

Fujio-Turner merged 1 commit into
release-4.0.0-betafrom
fix/issue-228

Conversation

@Fujio-Turner

Copy link
Copy Markdown
Owner

Finishes #228.

Duration display (formatTime / formatTimeTooltip) now lives in app/assets/js/time-format.js and is re-exported from ui-helpers.js. main-legacy.js uses the window bindings instead of an in-file Formatters object.

Timestamp display goes through formatTimestamp() in base.js. Remaining table/insight/chart .toISOString().replace('T', ' ')… call sites were converted. The hoisted local formatTimestamp in the AI timeline (which was shadowing the shared helper) is gone.

Tests: tests/formatters.test.js covers MM:SS.mmm and tooltip contracts (1500ms → 00:01.500, 65000ms → 01:05.000).

Move formatTime / formatTimeTooltip out of main-legacy into
time-format.js (re-exported from ui-helpers.js). Replace remaining
table/insight/chart .toISOString() display with formatTimestamp from
base.js, and drop the hoisted local formatTimestamp duplicate that was
shadowing the shared helper.

close #228
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Deploying cb-completed-request with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6cd1fb7
Status: ✅  Deploy successful!
Preview URL: https://52d89bce.cb-completed-request.pages.dev
Branch Preview URL: https://fix-issue-228.cb-completed-request.pages.dev

View logs

@Fujio-Turner
Fujio-Turner merged commit 6b843c8 into release-4.0.0-beta Sep 15, 2026
2 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.

1 participant