Commit Graph
306 Commits
Author SHA1 Message Date
Thomas DurieuxandClaude Opus 5.5 588a0e6461 style(admin): space the errors toolbar from the list and its states
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:33:20 +00:00
Thomas DurieuxandClaude Opus 5.5 2abd6beaa9 feat(admin): errors page built around issues, linked to repositories and users
The admin Errors page now shows one list of issues: records grouped by error
code (or exception type), service and route, each with a plain-language title,
a likely cause, its impact (failures, repositories, users), a trend and when it
was last seen. Expected 4xx answers sit in a collapsed group; slow and
interrupted requests are left out and counted, with a link to Performance.

- GET /api/admin/errors/issues groups server-side (admin-error-issues.ts). It
  reads central logs when they answer and the Redis history otherwise, accepts
  validated repoId/userId/service/window filters and resolves repository
  owners and user names when the database is connected.
- The cause is derived from external_request records of the same requests
  (#990 field names), fast 429s, storage and network codes, and the first
  application stack frame; otherwise it says nothing is known.
- Issue page (?issue=) with cause, affected repositories and owners, who hit
  it, failures over time and occurrences. Request view (&occurrence=) with a
  waterfall from the existing correlation lookup and Request, Exception and
  All fields tabs; missing data shows as "not recorded".
- Repositories (search = one repoId) and user admin pages list their issues,
  with a "failing now" banner.
- The source switch, export, clear history, telemetry and 24-hour counters
  move to a collapsed "Settings and diagnostics" section.
- Synthetic fixtures shared by dev-mock and preview-errors; old errors-page
  CSS removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:27:48 +00:00
Thomas DurieuxandClaude Opus 5.5 c281841f91 Merge origin/main into feat/log-repo-user-context; rebuild bundles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:38:00 +00:00
Thomas DurieuxandClaude Opus 5.5 86a35d62f1 feat(logging): record repository, user and viewer on log records
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>
2026-11-29 12:36:09 +00:00
Thomas Durieux 4e622adea3 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	public/asset-manifest.json
#	public/script/vendor.min.js
2026-11-29 12:12:42 +00:00
Thomas Durieux 50657b58a8 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	public/asset-manifest.json
#	public/css/all.min.css
#	public/css/style.css
#	public/script/vendor.min.js
#	scripts/dev-mock.js
2026-11-29 12:05:37 +00:00
Thomas Durieux 0233d1ad0b Merge remote-tracking branch 'origin/main' into fix/expected-errors-info
# Conflicts:
#	deploy/logging/sanitize.vrl
#	public/asset-manifest.json
#	public/script/vendor.min.js
#	src/core/log-diagnostic-schema.ts
2026-11-29 12:03:42 +00:00
Thomas DurieuxandClaude Opus 5.5 364642afa8 fix(ui): show the caption Files button only when the window has none
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:56:55 +00:00
Thomas DurieuxandClaude Opus 5.5 ef2a1b8ecc fix(i18n): translate the new streamer error codes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:55:44 +00:00
Thomas Durieux 07bdae9252 Merge remote-tracking branch 'origin/main' into feat/repo-list-sync
# Conflicts:
#	deploy/logging/sanitize.vrl
#	public/asset-manifest.json
#	public/script/vendor.min.js
2026-11-29 11:52:53 +00:00
Thomas DurieuxandClaude Opus 5.5 27802177b6 Merge origin/main into fix/workspace-polish; keep the Files button below 992px
The caption's Files button was the only way to open the file tree on
narrow screens when the preview shows no file (no README, loading, error).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:50:00 +00:00
Thomas DurieuxandClaude Opus 5.5 0e3055fa9c fix(ui): name the expiry date in its option and reveal the input on Change date
The dated option now reads "Expire on Apr 29, 2027" with a muted line
below ("In 5 months · Maximum on your plan", or the conference, Extended
expiration or saved-date reason). "Change date" sits beside the option
and reveals the bounded date input inline; an invalid date reveals and
focuses it, also on submit (forms.js dispatches a "reveal" event to a
hidden invalid field). The date and "After expiry" rows share one label
column, and "Never expire" keeps the same text edge. Without a plan
limit the option reads "Expire on a date" with the input shown.

A saved date on the same day as an Extended expiration limit keeps the
add-on as the reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 09:08:03 +00:00
Thomas DurieuxandClaude Opus 5.5 94947ad0ec fix(ui): steady list loading, picker footer, preview caption and plan-limited expiry
- 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>
2026-11-29 08:09:28 +00:00
Thomas DurieuxandClaude Opus 5.5 c73e992b7c feat: store the repository picker list and update it by webhook
The anonymize page's "Your repositories" picker now pages and searches a
per-user list stored in MongoDB instead of calling GitHub on every page and
search. GitHub is read only when the list is empty, when the user presses
the new refresh button, or after an installation change marks it stale.

- One sync per list (Mongo lock with a renewed lease); full pagination in
  the background after the first page is returned; rate limits pause syncs.
- GitHub App installation, installation_repositories and repository
  webhooks update the stored lists idempotently. The App must subscribe to
  the Repository event (documented in docs/github-app-setup.md).
- Legacy OAuth lists change only on refresh.
- Picker header shows "Updated 3 min ago" and a refresh button.
- dev-mock: stored list, simulated refresh and webhook endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 08:06:30 +00:00
Thomas DurieuxandClaude Opus 5.5 14eb4a5df8 fix(ui): show a failed reconnection instead of the old source's preview
Reconnecting cleared the source but left the previous source's debounced
preview pending, so previewStatus stayed "loading" and the preview pane
showed "Updating the anonymized preview…" over the reconnection error
until that timer fired. Whether the error was visible depended on timer
order, which is why the Vue test failed in CI but passed locally.

Cancel pending previews and reset the preview file on reconnect, as
urlSelected already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 08:05:14 +00:00
Thomas DurieuxandClaude Opus 5.5 23384dad92 fix: translate streamer and cache error codes
streamer_upstream_error and streamer_unreachable reach the browser from
AnonymizedFile when the streamer fails, and had no message. cache_miss is
an internal cache-only probe result, but the error-code coverage test
requires every backend code to have a translation. Rebuild the bundle,
which embeds the locale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 07:54:00 +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 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 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 7c4a7ab264 fix: distinguish source outages and throttling from missing repositories 2026-11-14 23:02:18 +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