- Requests carry userId on warn and error records only. The app calls
/api/user on every page load, so a userId on routine info records sat
next to the repoId a signed-in reviewer opened, and timestamps linked
them. Jobs keep it at every level. Logger, collector and the admin
projection apply the same rule.
- Admin user routes take an _id only as id:<_id>; a 24-hex GitHub login
can no longer match another account's _id for ban or promote.
- The download-job expectation includes the owner id the PR adds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Handlers that resolve an anonymized repository, pull request or gist now
put its public ID on the log context, so request, job and error records
carry repoId, pullRequestId or gistId. The signed-in user's internal _id
(userId) is recorded on account routes. On routes that serve anonymized
content, userId is kept only when the user owns, co-authors or
administers the project; otherwise the record carries viewer "visitor"
or "anonymous" and no userId. The collector, the Redis mirror and the
admin log APIs apply the same rule. Jobs carry repoId and the owner's
userId stamped at enqueue time.
The admin Errors page links repoId to the admin repository search and
userId to the admin user page, which now accepts a user _id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- My work keeps its tab bar and counts while a tab, search or filter
reloads: the first load holds the tab row with placeholders, a reload
dims the current rows and shows placeholder rows instead of a false
empty state. Admin repositories, users and conferences, the conference
page and the conferences list get the same placeholders and busy state.
- Repository picker: one footer row with the access link on the left and
a compact icon pager on the right; Previous only after page 1; a row's
name tooltip only when the name is cut short.
- Preview caption: the title stands alone, the redaction status is a chip
("Nothing redacted yet: add terms" focuses the Terms field). The
caption's Files toggle is gone: the tree is always shown from 992px and
the window's own file bar opens it below.
- Under a plan limit the expiry reads as text ("Apr 29, 2027 · in 5
months, the maximum on your plan") with the date input behind
"Advanced: pick an exact date"; validation still applies and a submit
opens the disclosure on an invalid date. Without a limit the picker
stays, and the echo no longer repeats "Expires".
- dev-mock: serves the dashboard summary API (with an optional delay
cookie), a 5-month free expiry and a long picker name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#952 and #953 added Billing and Emails to the admin tabs. From 768px to
~860px the eight tabs no longer fit, so Errors wrapped onto a second row
under the others. In that range the tabs now drop their icons, as on
phones, and stay on one row (scrolling, not wrapping, if still too wide).
Emails reused the Queues list icon; it now has an envelope (ui-icon-mail).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The subscriptions list shows one row per sale, grouped with the same
stages as the summary: a paper pack is one "Paper pack" row with its
parts on a second line. Filters, state tabs, sort and pagination count
sales. A new "Started" filter matches the summary periods.
- N days now draw N buckets ending today (12 months: 52 weeks), and the
tiles count from the same start.
- One family vocabulary: Subscriptions, Repository add-ons, Conferences in
the legend, the By-plan grouping and the list.
- Cancelling folds into "Renews / ends", revocation into "Status"; rows
have one height. Names and repository ids use proportional figures,
since Inter's tabular figures widen hyphens.
- New Amount column (cached Stripe list price, per period for
subscriptions, once per pack). Chart tooltips show count and revenue
per family and the total per currency.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(admin): add a Billing tab for subscriptions and sales
The admin can now follow subscriptions and sales without opening Stripe:
- Summary tiles: active subscriptions (monthly/annual), MRR with annual
plans counted as 1/12, sales and revenue for 7d/30d/90d/12m/all time,
all-time sales, subscriptions cancelling at period end, and refunds
and disputes.
- A stacked chart of sales per day, week or month by plan family.
- A by-plan table: active grants, period and all-time sales and revenue.
- A paginated list of grants with plan, Stripe status, active/expired/
revoked and user filters, linked to the admin user, repository or
conference.
- One row of webhook health: pending, failed, oldest pending event, last
error and unreviewed payment reversals.
A sale is one checkout or subscription, so a paper pack's three grants
count once. Revenue is each sale's Stripe list price, resolved once per
price and cached in memory. Currencies are never added together. Without
Stripe the page shows counts and marks revenue as unavailable.
GET /api/admin/billing/summary and /grants sit behind the admin check.
Grants get a { purchasedAt, _id } index for the list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: preserve payment history in admin billing totals
* fix: scope billing history and preserve original sale prices
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The UI was uneven: the home page looked finished, but app pages used three
different display typefaces, the anonymize flow changed frame between steps,
and the dashboard, explorer and admin screens each had their own controls,
status colours and edge-case handling.
Make every screen follow one system: shared page header, grid, buttons,
filters and status colours; a repository picker and step trail on anonymize;
a "What reviewers will see" preview of the actual reviewer page; consistent
file headers and viewers for every file type; truthful admin charts and
tables. Fold the accumulated override blocks back into style.css (22%
smaller, no visual change).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Admin errors: filters stack on phones (tabs, search, Sort and Group,
refresh) instead of squeezing into one row
- Admin overview: Summary / Performance / Cache views, kept in the URL
hash; charts take the full width on phones
- Phone menu: aligned rows with icons, neutral fill for the current page,
account links inline, no duplicate Sign in
- My work: removed and expired projects get a labelled badge, a muted
"Link offline" in place of the copy link, and an inline Enable/Extend
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backend, scripts, docs and their tests take main's newer code where both
sides changed the same lines (the shared blob cache, GitHubStream and
markdown fixes landed on main after the Go migration branch was cut).
The Dockerfile keeps the Go build from the migration, plus main's
owner-alert-protocol label; .gitignore keeps both sides' entries.
Frontend keeps the redesign and folds in main's features: Stripe billing
in the New anonymization submit bar, GitHub access repair, redaction
syntax help, the preview expand toggle, configurable redaction mask,
folder counts, reviewer-route header rules, link expiry (now in the
viewer's snapshot details) and the explorer error card. main's
narrow-only wrap logic is dropped because the redesign wraps on desktop
and scrolls sideways on phones.
Tests: 1534 passing with SESSION_SECRET set (as in CI). Three main tests
were updated for the agreed viewer design (no site header in the viewer,
no repository-wide file count).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One-row phone toolbar, errors page opens on server errors, one-row submit
bar, publish warning after a source loads, three-column FAQ with a help
card, queue range control in the Throughput card, shared admin table cards,
dark-mode contrast and a stronger phone code scroll cue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Viewer: full-height app bar with a Help menu, search + ZIP sidebar, one
toolbar for README and code, reading mode with a scroll-tracking outline,
docked find for Markdown and code, and redaction slots (a blank stone slot
holding the term number) in prose, headings, code, the tree and the path.
Landing and FAQ: live redaction demo, serif display headings, teal accent.
Author screens: My work table with copy/open/edit actions, a usage meter,
a single-container New anonymization flow with a sticky submit bar, themed
form controls, and consistent GitHub connection cards.
Admin: underline tabs, severity-first errors chart and list, error tiles
that filter (older pages load until matches appear), queue and overview
health states, and shared toolbar heights and borders.
Fixes: guarded localStorage access, failed README images render a
placeholder, phone hover states no longer stick, and UI tests updated for
the new copy and markup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Overview: error-volume bars render (the fills were inline spans), the
cumulative users chart is scaled to its range and labels it, latencies
over a second read in seconds, and charts and daily numbers use the
accent instead of four unrelated colours.
- Labels, table headers and state chips drop the mono caps; queue stat
values drop the serif.
- Error rows keep their content aligned; row metadata wraps instead of
truncating every item; "1 term" is singular.
- Errors filter uses the shared segmented control; breadcrumbs include
Admin; user detail spaces its status and actions, uses the accent for
Generate and says when no access token is stored.
- The jobs table scrolls inside its card on phones.
- Mock server: admin fixtures for every admin endpoint (ADMIN=1).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The range picker drew a border around every segment inside the group's
border, and Drain used a filled pill that made the most destructive
action the loudest. Segments are now borderless inside one outline with
a tinted selection, all header controls share one height, and Drain and
Clear all use a red outline. Queue labels drop the mono caps. ADMIN=1
signs the mock server in as an administrator.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add admin endpoints to ban and activate users, block banned users
from all auth flows (OAuth, token login, bearer auth), and invalidate
existing sessions on next request. Includes frontend translation and
user detail page ban/activate buttons.
The Generate button silently no-op'd because ng-model="newTokenName" inside
an ng-if block wrote to a child scope, leaving $scope.newTokenName empty.
Use $scope.tokenForm.{name,plaintext} so prototypal lookup resolves to the
controller scope.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>