Skip to content

v2.3.1 - #105

Merged
byteful merged 5 commits into
mainfrom
dev
Jul 29, 2026
Merged

v2.3.1#105
byteful merged 5 commits into
mainfrom
dev

Conversation

@byteful

@byteful byteful commented Jul 11, 2026

Copy link
Copy Markdown
Member

Confidence Score: 3/5

The PR should not merge until the new date-format value is accepted end-to-end, because users currently cannot persist the newly offered preference.

The panel submits MMM D, YYYY as a profile preference while the backend storage path only accepts three legacy values; custom-domain validation also now permits clearly malformed hostnames and sends avoidable API requests.

Files Needing Attention: client/src/components/settings/AccountSettings.tsx, client/src/pages/settings.tsx, client/src/utils/date-utils.ts, client/src/components/settings/DomainSettings.tsx

T-Rex T-Rex Logs

What T-Rex did

  • The focused persistence-contract harness verified that the pretty date format is rejected by the backend and that the AccountSettings autosave path emits the dateFormat MMM D, YYYY payload without mutating stored state.
  • Before-change responses showed the legacy date format, and after-change PATCH appeared to succeed but profile reloads still surfaced the legacy value, confirming the pretty date format was not persisted.
  • In the Replay Retention flow, the UI started with zero cards, and after enabling, disabling cleanup toggles allowed 30 days, with the Save Settings PATCH (expectedVersion: 7, enabled: true, days: 30) completing successfully, and only realtime WebSocket errors from the unavailable backend were observed.
  • Artifacts documented the pre-change and post-change flows with videos, posters, and logs to verify UI states and backend interactions.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
client/src/utils/date-utils.ts Adds locale-aware pretty date formatting and strict ISO chart-label conversion; the new persisted value is incompatible with the current backend allowlist.
client/src/components/settings/AccountSettings.tsx Exposes the new pretty-date preference even though the backend cannot store it.
client/src/pages/settings.tsx Adopts the pretty format as the client default and submits explicitly selected formats through profile autosave.
client/src/components/settings/DomainSettings.tsx Improves load-error feedback but weakens hostname validation enough to submit plainly invalid DNS names.
client/src/pages/audit.tsx Applies user-selected formatting to ISO date labels and uses lexical ordering for date-keyed analytics data.
client/src/components/settings/UsageSettings.tsx Adds an informational replay-retention exemption notice without changing retention behavior.
Prompt To Fix All With AI
### Issue 1
client/src/components/settings/AccountSettings.tsx:422
**Pretty date format is rejected**

When a user selects the new pretty-date option, profile autosave submits `MMM D, YYYY`, but the backend allowlist accepts only the three legacy formats, so the displayed selection is not persisted and reverts after the profile is refreshed.

### Issue 2
client/src/components/settings/DomainSettings.tsx:84-93
**Domain validation accepts malformed hosts**

The new validation accepts any dotted, whitespace-free string, including invalid hostnames such as `a..b`, `a_.example.com`, and `-panel.example.com`, so these values produce unnecessary configuration requests and defer basic validation to the API or DNS provider.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (2): Last reviewed commit: "Merge branch 'main' into dev" | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploying modl-panel with  Cloudflare Pages  Cloudflare Pages

Latest commit: 654042b
Status: ✅  Deploy successful!
Preview URL: https://f5392655.staging-panel.pages.dev
Branch Preview URL: https://dev.staging-panel.pages.dev

View logs

@byteful
byteful marked this pull request as ready for review July 27, 2026 20:39
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value={PRETTY_DATE_FORMAT}>{formatPrettyDateTime(new Date(2026, 0, 15, 12, 0))}</SelectItem>

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 Pretty date format is rejected

When a user selects the new pretty-date option, profile autosave submits MMM D, YYYY, but the backend allowlist accepts only the three legacy formats, so the displayed selection is not persisted and reverts after the profile is refreshed.

Context Used: Ensure all code meets SOLID, DRY, and KISS softwar... (source)

Artifacts

Repro: executable focused client-to-backend persistence contract harness

  • Evidence file captured while the check ran.

Repro: before-change legacy selection PATCH and profile reload responses

  • The full command output behind this check.

Repro: after-change pretty selection PATCH and reverted profile reload responses

  • The full command output behind this check.

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/components/settings/AccountSettings.tsx
Line: 422

Comment:
**Pretty date format is rejected**

When a user selects the new pretty-date option, profile autosave submits `MMM D, YYYY`, but the backend allowlist accepts only the three legacy formats, so the displayed selection is not persisted and reverts after the profile is refreshed.

**Context Used:** Ensure all code meets SOLID, DRY, and KISS softwar... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines 84 to 93
const validateDomain = (domain: string): boolean => {
const domainRegex = /^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9](?:\.[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])*$/;
return domainRegex.test(domain) && domain.length <= 253;
const normalized = domain.trim();
if (normalized.length === 0 || normalized.length > 253) {
return false;
}
if (!normalized.includes('.')) {
return false;
}
return !/\s/.test(normalized);
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Domain validation accepts malformed hosts

The new validation accepts any dotted, whitespace-free string, including invalid hostnames such as a..b, a_.example.com, and -panel.example.com, so these values produce unnecessary configuration requests and defer basic validation to the API or DNS provider.

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

Prompt To Fix With AI
This is a comment left during a code review.
Path: client/src/components/settings/DomainSettings.tsx
Line: 84-93

Comment:
**Domain validation accepts malformed hosts**

The new validation accepts any dotted, whitespace-free string, including invalid hostnames such as `a..b`, `a_.example.com`, and `-panel.example.com`, so these values produce unnecessary configuration requests and defer basic validation to the API or DNS provider.

**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))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@byteful
byteful merged commit 2d3997a into main Jul 29, 2026
2 of 3 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