Commit Graph
402 Commits
Author SHA1 Message Date
Thomas DurieuxandClaude Opus 5.5 4fc3a8b2df fix(viewers): summary row as the table's last row, identifiers left out
The CSV summary row read as a floating card: rounded, a repeated "Avg"
label in every cell, distinct counts under text columns and an average
of the seed column.

- The footer follows the column grid: square edges, a 2px top rule and
  the header's solid fill. It stays at the bottom of the scroll area,
  which no longer has vertical padding, so no rows show past it; a
  short table ends on it.
- One "Average" select in the first column (or the row-number column)
  sets the aggregate for every numeric column. Cells show only the
  value, right-aligned, semibold. A column can override it from its
  menu, marked by a small label in its cell.
- Text, date and identifier columns are empty in the footer; their
  distinct counts stay in the column menu.
- Identifiers (seed, id, run, fold, index, year by name, or small
  consecutive whole numbers that repeat) are left out of the summary,
  group averages and default charts. "Treat as number" in the column
  menu brings one back (#table:num=seed).
- Markdown and notebook tables get the same footer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 10:22:05 +00:00
Thomas DurieuxandClaude Opus 5.5 43e92bef53 feat(viewers): sort, filter, summarize, group and chart tables
The CSV/TSV viewer (explorer, gists, the author's preview) becomes an
analysis view that runs on the anonymized text already in the page:
click-to-sort headers (numbers, dates, natural text; stable, empty cells
last), a search box and per-column range or value filters, a summary row
(Average by default; Sum, Median, Min, Max, Count, Std dev) over the
filtered rows, group by with an aggregate, column stats with a histogram,
copy as CSV or Markdown and download of the current view, and a Chart
view (bar, line, scatter) drawn in inline SVG. The view lives in the URL
fragment (#table:group=model, #table-2:... for a gist file) so a link
can carry it; links without it open as before.

Markdown and notebook tables (pandas DataFrames) get sortable headers,
an optional summary row and "Open as table" for the full view.
Redaction slots keep rendering; sorting uses the XXXX-n text.

The 1 MB limit holds: rows render 200 at a time as one escaped HTML
string while aggregates, filters and charts use every row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 10:04:19 +00:00
Thomas DurieuxandClaude Opus 5.5 98bf382fa8 fix(viewers): GitHub-style threads, one-unit authors, shared slots and tabs, gist formats
Review threads: one container in the code column with comments divided by
rules; replies keep the first comment's indent (no nested cards). The
Conversation tab uses the same thread.

A fully redacted author renders as its slot alone, centred with the avatar
and date. Slots outside rendered Markdown use the explorer's .redact-slot
at the running-text alignment (.04em). PR and gist tabs drop the 2px
transparent border so the shared #949 line spans the label and count and
sits on the bar's rule.

Gists: each file renders with the explorer's viewers (Markdown, code,
notebook, CSV/TSV table, image, SVG, PDF, video, audio, binary and
too-large states), with a Preview/Source toggle where they differ and
Raw, copy and download. Binary gist files are now stored as base64 and
passed through unchanged; images follow the "Display images" option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 09:13:08 +00:00
Thomas DurieuxandClaude Opus 5.5 176bc857a1 feat(viewers): outlines for Markdown and gists, refined pull request page
Markdown: the "On this page" outline covers h1-h3, draws redaction slots
like the body, treats a lone opening h1 as the title, highlights the
section past the reading line, and shows its menu from 768 to 1199px too.

Gists: one card per file and an outline of the files (name, language,
lines) with Markdown headings nested under each file; sticky right rail
on wide screens, an "In this gist" menu on narrow ones.

Pull requests: header with state, anonymized author, branches and
commit count; Conversation, Commits and Files changed tabs; a file list
with +/- counts, per-file collapse, inline review threads, and redaction
slots in the title, body and diff. The server now stores the author,
branch names, commits (no SHAs) and review comments, grouped into
threads; older pull requests render without them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 08:13:31 +00:00
Thomas DurieuxandClaude Opus 5.5 ba15d3d4e0 fix(ui): don't double the picker's rule above the pager
Rows draw their divider on top, so the row cut by the scroll box no longer
stacks its bottom rule on the pager's top rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:28:20 +00:00
Thomas DurieuxandClaude Opus 5.5 2633fadba7 fix(admin): sit the Errors source tabs on the toolbar rule
The Central logs / Application history tabs (#957, #959) were centered in
a toolbar sized by the two-line health strip beside them, so their
underline floated ~10px above the rule. On desktop the toolbar now aligns
to the bottom and the active underline overlaps the rule, like the other
tab bars. Phones keep their stacked layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:17:34 +00:00
Thomas DurieuxandClaude Opus 5.5 48a246222e fix(admin): keep the admin tabs on one row and give Emails its own icon
#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>
2026-11-28 20:17:18 +00:00
Thomas DurieuxandClaude Opus 5.5 6c167a660e fix(ui): let the README fill the anonymize preview pane
#950 reuses the explorer in "What reviewers will see". The reading layout
keeps the reviewer page's 210px outline rail from 1200px up, sized on the
viewport, so in the ~500px side-by-side pane the README was squeezed into a
230-270px column next to an empty rail and code blocks were clipped.

The pane rule that should hide the file meta and Symbols was an @container
query; clean-css 4 drops @container blocks, so it never reached all.min.css
(the 1024px header overflowed). Both now key on the layout state instead:
outside the expanded preview the README is one full-width column with no
outline, and the meta and Symbols are hidden below a 1700px viewport, where
the pane stays under 700px. The reviewer page is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:16:51 +00:00
Thomas Durieux b284bfb4f9 fix(logging): retain safe ZIP and worker failure reasons 2026-11-19 15:04:03 +00:00
Thomas DurieuxandClaude Opus 5.5 1e99cda5e0 fix: make the admin billing tab count sales consistently and show amounts
- 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>
2026-11-16 15:28:19 +00:00
Thomas Durieux 9a20ad1cf8 fix: distinguish quota limits and increase author storage 2026-11-15 18:47:47 +00:00
Thomas Durieux fab574d556 Merge branch 'integrate/source-errors' into fix/source-failure-classification
# Conflicts:
#	public/asset-manifest.json
#	public/script/vendor.min.js
2026-11-14 23:45:58 +00:00
Thomas Durieux 318a1f9984 Show source reconnection failures after successful metadata loads 2026-11-14 23:44:59 +00:00
Thomas Durieux 8e1bbffbe3 Merge branch 'integrate/source-errors' into fix/source-failure-classification
# Conflicts:
#	public/asset-manifest.json
#	public/script/app.js
#	public/script/vendor.min.js
2026-11-14 23:40:39 +00:00
Thomas Durieux c591306a33 fix: offer account reconnection for expired source authorization 2026-11-14 23:39:24 +00:00
Thomas Durieux 5c2c95ed8a Merge branch 'integrate/source-errors' into fix/source-failure-classification
# Conflicts:
#	public/asset-manifest.json
#	public/script/vendor.min.js
2026-11-14 23:36:24 +00:00
Thomas Durieux 1dfd898aa6 fix: retain source access actions when edit repair is unavailable 2026-11-14 23:35:28 +00:00
Thomas Durieux d9c8a8fb4d Merge branch 'integrate/source-errors' into fix/source-failure-classification
# Conflicts:
#	public/asset-manifest.json
#	public/script/vendor.min.js
2026-11-14 23:32:35 +00:00
Thomas Durieux 0ddcb2057f fix: recover source metadata after branch refresh failures 2026-11-14 23:31:43 +00:00
Thomas Durieux 233bb7eae6 Merge branch 'integrate/source-errors' into fix/source-failure-classification
# Conflicts:
#	public/asset-manifest.json
#	public/script/vendor.min.js
2026-11-14 23:24:11 +00:00
Thomas Durieux bc44879b43 Merge remote-tracking branch 'origin/main' into integrate/source-errors
# Conflicts:
#	public/asset-manifest.json
#	public/css/all.min.css
#	public/script/vendor.min.js
2026-11-14 23:23:19 +00:00
Thomas Durieux 70e8ff15cc Merge branch 'integrate/source-errors' into fix/source-failure-classification
# Conflicts:
#	public/asset-manifest.json
#	public/script/vendor.min.js
2026-11-14 23:21:40 +00:00
Thomas Durieux c014b3c8cf Merge remote-tracking branch 'origin/main' into integrate/source-errors
# Conflicts:
#	public/asset-manifest.json
#	public/css/all.min.css
#	public/css/style.css
#	public/partials/anonymize.htm
#	public/script/vendor.min.js
2026-11-14 23:20:40 +00:00
Thomas Durieux 8eb5097070 Merge remote-tracking branch 'origin/main' into integrate/diagnostics 2026-11-14 23:19:23 +00:00
Thomas Durieux 6035c01956 Merge remote-tracking branch 'origin/main' into integrate/diagnostics
# Conflicts:
#	deploy/logging/README.md
#	public/asset-manifest.json
#	public/css/all.min.css
#	public/css/style.css
#	public/script/vendor.min.js
2026-11-14 23:19:22 +00:00
Thomas Durieux fbb9c5fac0 Merge pull request #967 from tdurieux/fix/deployment-and-repository-errors
fix: guard GitHub App deployments and distinguish removed repositories
2026-11-15 00:18:37 +01:00
Thomas Durieux 7c4a7ab264 fix: distinguish source outages and throttling from missing repositories 2026-11-14 23:02:18 +00:00
Thomas Durieux 65914c743e fix: validate GitHub App mounts before deployment and distinguish removed repositories 2026-11-14 22:57:01 +00:00
Thomas DurieuxandClaude Opus 5.5 39b0adab83 fix(anonymize): give the preview's error state the full window
With no source loaded the file tree is hidden, so drop its grid column too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 22:28:25 +00:00
Thomas DurieuxandClaude Opus 5.5 1412de9d9f fix(anonymize): one message and one next step when a source fails to load
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>
2026-11-14 22:22:33 +00:00
Thomas Durieux 0b967aa8af perf: paginate repository discovery and search 2026-11-14 21:49:12 +00:00
Thomas Durieux 5dbf3e7829 feat: retain bounded failed-request reproduction context 2026-11-14 21:44:48 +00:00
Thomas Durieux 3a1d013b11 fix: show useful history occurrences instead of status-only rows 2026-11-14 21:30:46 +00:00
Thomas Durieux f6574069da feat: preserve safe request and exception diagnostics 2026-11-14 21:22:28 +00:00
Thomas Durieux 5fa6cfafed feat: lead error investigations with related events 2026-11-14 20:07:19 +00:00
Thomas Durieux 2c24d2e892 feat(admin): simplify errors into focused event inspectors 2026-11-14 19:55:50 +00:00
Thomas Durieux 008ece9e1c fix(admin): let slow history requests finish between polls 2026-11-14 19:39:24 +00:00
Thomas Durieux 67d0ad928c fix(admin): explain log outcomes and clarify identifier actions 2026-11-14 19:33:01 +00:00
Thomas Durieux 40ffe7ce72 fix(admin): streamline error history and preserve safe raw records 2026-11-14 19:15:45 +00:00
Thomas Durieux b39f3b6878 fix(admin): refine error triage hierarchy and detail layout 2026-11-14 18:38:33 +00:00
Thomas Durieux 4041583c12 feat: rebuild admin errors for focused triage 2026-11-14 18:04:46 +00:00
Thomas Durieux 35e69b3291 Merge main and preserve email and log investigation styles 2026-11-14 17:24:13 +00:00
Codex 20621c0660 fix(admin): include unknown releases and edge failures in investigations 2026-11-14 16:53:13 +00:00
Codex 21f2c4eb4d fix(admin): preserve scanned Redis history during refresh 2026-11-14 16:34:58 +00:00
Codex 8b928a4c82 feat(admin): investigate correlated logs from the Errors page 2026-11-14 16:33:37 +00:00
Thomas Durieux 99bf9f173e feat(admin): add email activity and investigation workflow 2026-11-14 13:21:03 +00:00
Thomas Durieux 8f272b7c7b fix(admin): make email history usable on mobile and preserve retries 2026-11-14 12:59:01 +00:00
Thomas Durieux 6400760fcb feat(admin): track email delivery attempts 2026-11-14 12:51:32 +00:00
Thomas DurieuxandClaude Opus 5.5 511dcd7067 feat(admin): billing tab to monitor subscriptions and sales (#952)
* 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>
2026-11-13 14:37:29 +01:00
Thomas DurieuxandClaude Opus 5.5 476f25e264 feat(ui): browse and check every file in the anonymize preview (#950)
* 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>
2026-11-13 14:27:13 +01:00