Skip to content

Compose partial-window notice: "1 day", not "1 days" - #2785

Merged
erikdarlingdata merged 2 commits into
devfrom
fix/compose-partial-window-plural
Sep 2, 2026
Merged

erikdarlingdata merged 2 commits into
devfrom
fix/compose-partial-window-plural

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Found dogfooding a Custom View against a one-day-old store. The composer's partial-window notice (the amber box on a panel whose window reaches past the stored data) read:

partial window: this panel read the raw tier, which on this store reaches back about 1 days, but the requested window starts 1 days back — older points are not included.

ComposeStoreAvailability.BuildRetentionNotice interpolated the day count with a hardcoded days plural ({heldDays:0} days / {windowDays:0.#} days back). Now it pluralises on the rendered number: "1" → day, "1.5" / "30" → days. The sibling MCP notices already use the day(s) convention; this one is a prose notice, so proper singular reads better.

Verified by a test that builds a measured hourly floor at now-1d with a 2-day window, so one notice exercises both arms ("1 day" + "2 days back"); the existing plural assertions (4 / 10 / 90 days) still pass. 258/258 DarlingComposeTests green. Pure grammar change, no logic touched.

🤖 Generated with Claude Code

erikdarlingdata and others added 2 commits September 2, 2026 16:12
Found dogfooding a Custom View against a one-day-old store: the partial-window
notice read "reaches back about 1 days, but the requested window starts 1 days
back" -- the count was interpolated with a hardcoded "days" plural. Pluralise on
the RENDERED number instead (heldDays formats whole, windowDays to one decimal),
so "1" is singular while "1.5" / "30" stay plural. Sibling notices already use the
"day(s)" convention; this one is a prose notice, so proper singular/plural reads
better than "1 day(s)".

Test builds a measured hourly floor at now-1d with a 2-day window so both arms
fire in one notice ("1 day" + "2 days back"); the existing plural assertions
(4 / 10 / 90 days) still pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NejjkZaVWuzkinutWa2gLc
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01NejjkZaVWuzkinutWa2gLc
@claude

claude Bot commented Sep 2, 2026

Copy link
Copy Markdown

Reviewed. Small, well-scoped grammar fix confined to Darling'''s web-dashboard composer (ComposeStoreAvailability.BuildRetentionNotice) — this notice has no Lite counterpart (Lite has no web-dashboard composer), so no parity drift. Pluralization logic is correct for the "1"/non-"1" cases and doesn't change the underlying rounding (same "0"/"0.#" format specifiers as before), CultureInfo is already imported, and the new test exercises both the singular and plural arm in one notice. No T-SQL, no security or performance surface touched. No findings.

@erikdarlingdata
erikdarlingdata merged commit d2c14b7 into dev Sep 2, 2026
6 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/compose-partial-window-plural branch September 12, 2026 20:30
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