Skip to content

[v2.3] hotfix 1 - #104

Closed
byteful wants to merge 1 commit into
mainfrom
dev
Closed

[v2.3] hotfix 1#104
byteful wants to merge 1 commit into
mainfrom
dev

Conversation

@byteful

@byteful byteful commented Jul 10, 2026

Copy link
Copy Markdown
Member

Confidence Score: 4/5

Mostly safe to merge after the chart ordering bug is fixed.

The copy and formatter changes are contained, but the combined audit metrics chart can show dates in the wrong order for non-ISO labels.

client/src/pages/audit.tsx

T-Rex T-Rex Logs

What T-Rex did

  • Ran the Node harness that exercises the audit page's combine logic and final localeCompare sorting, and reproduced a non-chronological order with an intentional repro failure.
  • Collected and catalogued validation artifacts, including pre-change source excerpts, post-change evidence, API call logs, and the Playwright script, to support review.
  • Reviewed after-change validation outputs, including the video, screenshots, and network logs, to confirm UI stability and correct rendering of usage data under the hotfix.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
client/src/pages/audit.tsx Formats chart date labels according to user date settings, but the combined metrics sort now regresses chronological ordering for non-ISO date labels.
client/src/utils/date-utils.ts Adds an exported ISO date-only chart label formatter that preserves non-ISO labels unchanged.
client/src/components/settings/UsageSettings.tsx Adds a conditional informational replay-retention exemption note.
client/src/locales/en.json Adds the replay-retention exemption translation key.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
client/src/pages/audit.tsx:1808
**Preserve chronological sorting**
`combinedMetricsData` still accepts arbitrary `string` date labels from three analytics responses, and the removed code explicitly handled labels such as `Jan 15`. Sorting with `localeCompare` puts non-ISO month labels alphabetically, so the combined metrics chart renders points out of chronological order when those existing labels are returned.

Reviews (1): Last reviewed commit: "audit/analytics improvements" | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

}
return a.date.localeCompare(b.date);
});
return Array.from(dateMap.values()).sort((a, b) => a.date.localeCompare(b.date));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Preserve chronological sorting
combinedMetricsData still accepts arbitrary string date labels from three analytics responses, and the removed code explicitly handled labels such as Jan 15. Sorting with localeCompare puts non-ISO month labels alphabetically, so the combined metrics chart renders points out of chronological order when those existing labels are returned.

Rule Used: This is a React frontend project on React 19 with ... (source)

Artifacts

Repro: executable combined metrics sort harness

  • Contains supporting evidence from the run (text/javascript; charset=utf-8).

Repro: failing execution log showing non-chronological sorted output

  • Keeps the command output available without making the summary code-heavy.

View artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix With AI
This is a comment left during a code review.
Path: client/src/pages/audit.tsx
Line: 1808

Comment:
**Preserve chronological sorting**
`combinedMetricsData` still accepts arbitrary `string` date labels from three analytics responses, and the removed code explicitly handled labels such as `Jan 15`. Sorting with `localeCompare` puts non-ISO month labels alphabetically, so the combined metrics chart renders points out of chronological order when those existing labels are returned.

**Rule Used:** This is a React frontend project on React 19 with ... ([source](https://app.greptile.com/modl-gg/-/custom-context?memory=b7532101-0c9e-4ab6-b168-353a105ba593))

How can I resolve this? If you propose a fix, please make it concise.

@byteful byteful closed this Jul 11, 2026
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