Operator limits: plan and usage page in workspace settings
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 12/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- full-stack
Research direction
Start from the workspace settings sub-pages and the Runs page, which the issue names as the polling pattern to follow, then read the entitlement and usage repositories from #271 and #272 that the new usage-summary.ts module will call. The page lives at /w/<slug>/settings/plan, with copy in src/copy/ and colors only from theme.css. Done when test cases T01 to T10 pass, including the checks that no cost, model id or job data reaches the DOM or the API response.
Written by the indexing model from the issue text.
Description
Part of #268. Depends on #272 and #277.
Problem
A workspace with limits has no way to see them. People find out that a limit exists when a review is refused (#277). The page should say, before that, what the workspace may use, how much it has used in the current period, and whether reviews are paused.
Behavior
- New page
/w/<slug>/settings/planin the workspace settings (a sub-page like the others of #178), visible to every member (read-only), reachable from the settings navigation only when the workspace has entitlements; for an unlimited workspace the link is not shown and the page says no limits apply. - Content, from the effective entitlements (#271) and the usage records (#272) since
period_start:- the plan label and, when
managed, a sentence that the instance provides the models; - "Diff reviews: 3 of 5" and "Dynamic reviews: 1 of 2", or "no limit" for
null(the count isreservedplussettled, as in #277); - when a cost limit exists: a percentage of the limit used, with a bar and a text equivalent. The page never shows an amount of money or the measured model cost, in any unit;
- the date the current period started (the app does not know when it ends);
- a plain notice when reviews are paused for the workspace, without a reason.
- the plan label and, when
- Shown as server-rendered data plus the existing polling pattern if the numbers can change while the page is open (same rules as the Runs page);
Cache-Control: no-store. - Copy in
src/copy/, tokens only fromtheme.css, accessible by text, not color alone. - No model names, ids or tier models on the page.
Scope
Page, a small usage-summary.ts read module over the repositories of #271/#272, the workspace route for polling if used, copy, navigation entry, docs.
Out of scope
Changing a plan or any link out (#284), per-run cost, a history of earlier periods.
Test cases
| ID | kind | level | case | expected |
|---|---|---|---|---|
| T01 | regression | unit/integration | unlimited workspace | no navigation entry; direct URL shows "no limits apply" |
| T02 | behavior | integration | limits 5 and 2, usage 3 and 1 | "3 of 5" and "1 of 2" |
| T03 | behavior | integration | a null limit |
"no limit" |
| T04 | behavior | unit | cost limit, cost used 62 % | a 62 % bar with a text equivalent; no currency, no cost value anywhere in the DOM or the API answer |
| T05 | behavior | integration | records before period_start |
not counted |
| T06 | behavior | integration | suspended | a pause notice without a reason |
| T07 | security | integration | a member of workspace B opens A's page or API | answer of a path that does not exist |
| T08 | security | integration | answers and DOM | no model id, tier model, key or job data |
| T09 | behavior | unit | accessibility | percent bar has text, focus order, no color-only state |
| T10 | behavior | integration | void and reserved records |
void not counted, reserved counted |
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 1h 15m
- Merged PRs (30d)
- 168
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ExpidetGames/code-reviewer
-
area: app type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ExpidetGames/code-reviewer#308 ·
Maintainers usually reply within 1 day
-
type: docs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ExpidetGames/code-reviewer#94 ·
Maintainers usually reply within 1 day
-
Dynamic Review: recover when the engine turn ends without a structured answerPossibly taken @Schacki-Jr claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 18/100
ExpidetGames/code-reviewer#309 ·
Maintainers usually reply within 1 day
-
area: runner type: chore
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ExpidetGames/code-reviewer#307 ·
Maintainers usually reply within 1 day
-
Dynamic Review: an incremental review with an ancestor as previous commit becomes a full reviewOpenarea: runner type: bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ExpidetGames/code-reviewer#306 ·
Maintainers usually reply within 1 day
All issues in ExpidetGames/code-reviewer
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dsh-market/dsh-market#877 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-dev-skill#151 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area:arcade game ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fderuiter/deruiter.dev#2281 · 1 comment ·
Maintainers usually reply within 1 day
-
scope: data grid type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days