Repository navigation
feat: admin sidebar everywhere, several departments at once, small usage trends - #62
Open
brtydse100 wants to merge 9 commits into
Open
brtydse100 wants to merge 9 commits into
brtydse100 wants to merge 9 commits into
Conversation
…age trends
- Anyone with admin access keeps the sidebar on My key and Analytics, so
switching the demo to Admin shows the admin navigation at once; the
top-bar Admin link is gone.
- The Organization page can combine any number of top-level departments
(or All): cards, Needs attention, spend split, group table and the usage
report add up the selection. The users and usage endpoints accept a
repeated `node` parameter (up to 50 groups, each scope-checked); several
groups break down by group in the report.
- The usage report shows three compact spend, request and token cards,
each with its total, a small daily trend, the daily average and the peak
day, instead of one large chart with a metric picker.
- Level names pluralise correctly ("2 branches").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each trend card shows one bar per day (hover for that day's value) instead of a continuous line, and the Daily values tables are removed to keep the cards light. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The usage report adds a contribution-style grid: one row per group, ranked by tokens, one square per day shaded by tokens, with each row's total. The usage API adds an additive `daily` array to every `by_group` entry for this. - The demo role switch adds Owner (People: owns Platform, a team of people; Teams: owns Infrastructure, a team of teams). The demo API scopes organization data like delegated access does. - A single team without sub-teams opens straight on its report and members instead of an empty group table; its cards and report name the team rather than "all groups" or "+ all sub-groups". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the three daily bar cards and the team-by-day grid with one contribution history: Spend / Requests / Tokens tabs with their totals, chips ranking groups by the chosen metric (tokens first), and a calendar of weekly columns with one square per day, month labels and a Less-More legend. Choosing a group shows its own history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the contribution calendar with compact cards: weekly spend and request bars, tokens by group or member, and spend by model as a donut, each with two summary figures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bars show a tooltip with the exact figure and turn solid while the rest fade; the donut reads the hovered slice in its centre and highlights its legend row. Charts take keyboard focus and step with the arrow keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Usage report button only ever opened the report and the report had no close control. The button now toggles (reading "Hide report" while open) and the report has a close button; a selected group's report closes with the group. A childless team's report stays, as it is the whole view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plitting - A team without sub-teams lists its own row; the usage report opens only on request, as for administrators. - A single team is named where the department picker would be, and owners get a Team budget card in place of the admin-only gateway status. - Owners wait for their access check instead of flashing the top bar, and the sidebar labels them "Team owner". - The demo enables budget planning with the backend's rules: owners split their team's budget among teams and members, but cannot raise their own team's total, their own allowance or per-person limits. Platform gains two synthetic teammates so there is something to split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A People list (members, spend and allowance) replaces the separate Budget planning section: a team of people opens on it, and choosing any team shows everyone in it beneath the group table. Allowances save in place; team budgets stay in the edit panel, now noting who sets a read-only total. - The group budget's focus ring surrounds the whole field. A global :focus-visible colour turned the input's transparent outline blue, so it crossed the "$" prefix. - The sidebar has a visible theme switch. - The report and the People list no longer share a React key, which left stale member lists on screen. - Real-Keycloak specs edit budgets and limits through the group panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Do not merge yet: the requester is still trying it out.
What changes
Admin sidebar everywhere
Several departments at once
GET /api/v1/organization/usersand/usageaccept a repeatednodeparameter (up to 50 groups, each scope-checked). One group breaks down by its children, several by the groups themselves.Usage report
main.dailyarray to eachby_groupentry to support this.Team owners
src/demo/budgets.ts) with the backend's rules. Owners split their team's budget among sub-teams and members, but can't raise their own team's total, their own allowance or per-person limits. Platform gains two synthetic teammates so there is something to split.People and budgets in place
:focus-visiblecolour had turned the input's transparent outline blue, and it crossed the "$".sso-budget-authority,sso-large-org,sso-restart) now edit budgets and limits through the group panel, via the sharede2e/organizationPanel.tshelper. I checked the helper's three paths against the demo locally; Docker isn't available here, so those specs run in CI only.Small fix: level names pluralise correctly ("2 branches").
Preview image
Built from head
14eaba08b5a0f95b624680489d8de89d306be5a1. The image'sorg.opencontainers.image.revisionlabel matches; linux/amd64 and linux/arm64.Validation
pytest921 passed, 5 skipped;ruff format --checkclean. Tests cover combining groups, per-group validation, repeatednodeparameters and per-group daily usage.tscclean; Vitest 246 passed (the old Budget planning tests moved toPeopleTable.test.tsx).🤖 Generated with Claude Code