Title a model-scoped limit the way the flat ones title themselves

A scoped window read as "Fable weekly" beside "Session" and "Weekly", so
the one row that names a model was also the one row in lowercase.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-08-11 12:43:03 +02:00
co-authored by Claude Opus 5
parent 0ad64a59df
commit efe805387e
2 changed files with 9 additions and 8 deletions
+5 -4
View File
@@ -653,15 +653,16 @@ def usage_bucket(payload: dict[str, Any], key: str) -> dict[str, Any] | None:
# ("weekly_scoped", "five_hour_scoped"). The panel reads a window out of free
# text, which cannot survive a model name like "Opus 5 (1M context)" — the
# "1M" reads as a one-minute window — so the window is settled here instead
# and travels as an explicit title.
# and travels as an explicit title. It is capitalized the way the flat windows
# title themselves, so "Fable Weekly" sits beside "Weekly" rather than under it.
def scoped_window(kind: str) -> str:
text = kind.lower()
if "month" in text:
return "monthly"
return "Monthly"
if "week" in text or "day" in text:
return "weekly"
return "Weekly"
if "hour" in text or "session" in text:
return "session"
return "Session"
return ""