A repository URL that could not be read produced a pile of messages:
"Does not exist or is not accessible", a "Repository not listed?" label,
two access notes, a private-content warning, an empty branch/commit grid
with "The commit SHA is not valid", a toast, and an enabled-looking
"Create anonymous link" whose reason pointed to the preview.
- Under the URL, one error block per case (malformed URL, missing or no
access, organization restriction or SSO, already anonymized), naming
the source and giving its fix: Manage GitHub access and Try again.
The preview shows the same wording and actions; no toast.
- Drop "Repository not listed?". The landing picker gets a quiet
"Don't see your repository? Manage GitHub access" link instead.
- New anonymizations hide branch/commit, auto-update and the other
sections until the source loads. Edit mode keeps them editable.
- The publication warning shows only once a private source has loaded;
the repository metadata now includes GitHub's `private` flag.
- The primary button is disabled until the source loads, with a short
local reason, and the draft line waits for a loaded source.
- dev-mock: failing, slow, PR, gist and edit-mode fixtures.
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>
* feat(ui): browse and check every file in the anonymize preview
The "What reviewers will see" window now redacts the README GitHub actually
shows and lets authors open any file of the commit.
- README: resolved from the file list like GitHub (.github/, root, docs/,
any case, Markdown first) and only that path is tested against the
"Leave files unredacted" rules. Before the list loads, only root names are
assumed, so leaving docs/ unredacted no longer unredacts the root README.
The file bar shows the README's real name.
- New GET /api/repo/:owner/:repo/file?commit=&path= (same access checks as
/tree): raw text, no-store, path traversal rejected, 1 MB cap
(file_too_big, 413), binary files reported as { binary: true }.
/tree also lists binary files (binaryFiles) for the preview's tree.
- Tree rows open files (keyboard accessible, explorer active rail). Text is
redacted through /api/anonymize-preview by the same batcher as the README;
files left unredacted are sent without terms and tagged "Left unredacted"
(opens the dialog). Markdown renders like the README, code is highlighted
with Prism, images/PDF/binary/too-large files get a short note. Loading
and error (Retry) states reuse rp-state.
- File and folder names are redacted through /api/anonymize-preview.
- Caption counts the open file; "<name> left unredacted" when preserved.
- Phones: the Files button opens the tree as a sheet.
- dev-mock: a jsmith/robust-repair source with tree, file and
anonymize-preview endpoints and fixtures carrying the mock's terms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(ui): reuse the explorer in the anonymize preview
Share the explorer file renderer and tree with the author preview. Apply
preserved-file rules on the server and keep the reviewer rendering and
redaction slots consistent across both views.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): keep the reviewer page unchanged by the preview reuse
The preview reuses tree.js and the shared file viewer; its differences now
apply only inside the anonymize preview.
- The narrow-pane rule that hid the file meta and Symbols applied to the
reviewer page too (visible with a widened sidebar); it is scoped to
.reviewer-preview. The token capture moves from body to the page that
holds the preview.
- tree.js: aria-expanded/aria-current and tree-only scrolling apply only
when the tree is embedded (selectedPath set); the reviewer page keeps
scrollIntoView and its original markup.
- file-viewer: the extra menu-closing click listener, the #L hash writes and
the Ctrl+F/G and Alt+Z shortcuts are limited to the preview (shortcuts
only while its code has focus), so the form keeps the browser's Find.
- Preview: the tree's file list is cached between renders, name batches are
chunked under the JSON body limit, /api/anonymize-preview accepts up to
3 MB so files up to the 1 MB preview limit can be redacted, and on phones
the caption's "<name> left unredacted" opens the dialog (the header tag
squeezed the path out).
- dev-mock: long and nested names for the tree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): restore the redaction number on the right and level the slots
The redesign centered the term number in every redaction slot; it sits on
the right edge again, in code, Markdown, the tree and the breadcrumb. Tree,
breadcrumb and paragraph slots also sat about 2px below the text; they now
center on the line's letters.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: address preview navigation and path review findings
---------
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>