Skip to content

docs(spec): specs for #492, #493, #494, #495 - #496

Closed
fclairamb wants to merge 4 commits into
mainfrom
docs/specs-issues-492-495
Closed

fclairamb wants to merge 4 commits into
mainfrom
docs/specs-issues-492-495

Conversation

@fclairamb

Copy link
Copy Markdown
Owner

Specs written by /fix-issues for the four open bug reports. Each one needed more than a direct fix (migration, credential handling, cross-cutting UI or an open decision), so the spec file is now the tracking artifact and the issues are closed.

Issue Spec model/effort Why a spec
#492 specs/todos/2026-10-08-01-email-gmail-android-dark-rendering.md sonnet/medium base.html + ~10 templates + tests; dark-mode pin is an open decision
#493 specs/todos/2026-10-08-02-resolve-incidents-on-every-check-delete.md opus/medium orphan backfill migration, new resolution_type, escalation side; open question on notifications
#494 specs/todos/2026-10-08-03-pushover-settings-key-drift.md opus/medium key rename + encryption backfill for existing rows, credentials
#495 specs/todos/2026-10-08-04-port-field-defaults-and-chips.md sonnet/medium six port fields, new chip primitive, cross-cutting error timing; open question on scope

Spec only, no code. Implementation goes through /implement-todos.

Refs #492, #493, #494, #495

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.52%. Comparing base (5361e9f) to head (5694439).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #496      +/-   ##
==========================================
- Coverage   82.58%   82.52%   -0.07%     
==========================================
  Files        1167     1167              
  Lines      120960   120960              
==========================================
- Hits        99892    99818      -74     
- Misses      21061    21135      +74     
  Partials        7        7              

see 19 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

fclairamb added a commit that referenced this pull request Oct 9, 2026
…ds, bug report, Discord) (#500)

## Summary
Implements the 8 specs of the 2026-10-09 batch (specs archived to
`specs/done/2026/10/`), plus the specs from #496 and #497.

- Gmail Android dark mode: owned link colors, full-bleed phones, flat
light surfaces
- Check deletion resolves incidents with a `check_deleted` resolution,
one notification, backfill migration `027_v0_39_0`
- Pushover canonical `user_key`/`api_token`, startup backfill,
`INTEGRATION_MISCONFIGURED`, settings drift guard (also fixes ntfy)
- Port fields: defaults, chips, `host:port` paste, no error before input
- Bug report: mobile annotation, inline text, charts in screenshot,
pen/highlight/blur/redo, select, viewport crop
- First-setup secrets saved (SMTP password, JWT secret, inbox password),
live email config for test mail
- Discord webhook-only delivery and webhook URL validation
- Discord setup docs and redirect URI panel, `SP_DISCORD_REDIRECT_URL`
removed

## Breaking changes
- Saving a Discord integration with a non-Discord `webhook_url` returns
400.
- Server-side check form errors show only after the field is touched or
the form is submitted.
- `SP_DISCORD_REDIRECT_URL` is ignored (startup warning).

## Operator actions
- Add the second Discord redirect URI in the Discord portal.

The Gmail device-matrix rows in `wiki/features/email-dark-mode.md` still
need a human with a phone.

Closes #492
Closes #493
Closes #494
Closes #495

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
@fclairamb

Copy link
Copy Markdown
Owner Author

Folded into #504, closing.

@fclairamb fclairamb closed this Oct 10, 2026
fclairamb added a commit that referenced this pull request Oct 10, 2026
The public status page was slow to show anything. On a 74-resource,
90-day page the resources appeared after 1.1 to 1.9 s in production (3
to 4 s under `make dev`), and the browser was frozen for most of that
time. Three causes, all fixed here.

## Results (production build, 74 resources, 90 days)
| | Before | After |
|---|---|---|
| Resources on screen | 1.1 to 1.9 s | ~0.09 s |
| Page ready (bars, charts, updates) | 1.1 to 1.9 s | ~0.17 s (0.83 s on
a cold server cache) |
| Main thread blocked | ~1.8 s | ~55 ms |
| Calls per 30 s refresh | 1 big call | 1 call |

## 1. Load in stages
- Stage 1 `?include=`: sections, resources with current status, active
incidents. First paint.
- Stage 2 `?include=availability,responseTime`: availability bars and
response-time charts. If it fails, stage 1 stays on screen.
- Stage 3 `?include=updates`: recent updates, last 7 days. "Show older
updates" asks for the full `historyDays` window with the new
`updatesDays` param.
- Stages 2 and 3 only fire once stage 1 succeeds, so a locked page shows
the unlock form and nothing else. They start the moment stage 1's
response arrives, not after React has rendered it.
- Named pages (`/s/{org}/{slug}`), custom domains and the org's default
page (`/s/{org}/`) all use it.
- While stages 2 and 3 load, the bar, the chart, the row percentage and
the header uptime pill keep their exact space, blank. Rows do not move
when the data lands (CLS 0, desktop and mobile). A multi-region chart
still adds its legend line, since stage 1 cannot know the regions.
- Stage 1 no longer waits for the bundle: a small inline script in the
shell starts it (then stages 2 and 3) while the JS downloads, and
`apiFetch` takes those promises by exact URL. On a 100 ms round trip the
page shows ~100 ms sooner (531 vs 630 ms, production build). The script
is part of the built shell, so the CSP hashes allow it.
- Once loaded, the page refreshes with one call,
`?include=availability,responseTime,updates`, instead of polling each
stage.
- Polls fetch with `cache: "no-cache"`. The server's `public,
max-age=60, stale-while-revalidate=30` meant most 30 s polls were
answered from the browser's disk cache, with data up to 90 s old. The
header is unchanged, so a CDN still caches.

## 2. Slow SQLite query
The response-time seam query (`AggregateResponseTimeBins`) joined its
p95/p50 CTEs back onto the bins, and SQLite planned one of those joins
as a full scan per bin. It took 7 s and held the only connection, so
every other query (page lookup, result inserts) queued behind it. Both
percentiles are now computed in the same GROUP BY: identical rows, 0.26
s instead of 3.1 s on a copy of the dev database. Postgres is unchanged.

## 3. Rendering cost
- The availability bar mounted one Radix tooltip per day segment (~6 600
on this page) and formatted every tooltip date up front, about 1 s of
work. It now has one tooltip per bar, built for the hovered segment
only.
- All 74 response-time charts (recharts) drew at once, about 1 s more.
They now mount when they come within 800 px of the viewport.
- Each 30 s refresh re-rendered every row, bar segment and chart even
when one number had changed. Sections, rows and the updates timeline are
memoized, so a refresh only redraws the rows that changed.

## API
- New `include` token `updates`, and `updatesDays` (positive integer,
bounded by `historyDays`, 400 otherwise).
- No `include` still returns everything with the full `historyDays`
window. The embed widget, the Atom feed and third parties are unchanged.
- Documented in `openapi.yaml` and
`web/docs/docs/features/status-pages.md`.

## Also in this branch
- The specs from #496 and #497 (both closed, folded in here), without
the todo copies of specs already done on main.
- New spec `2026-10-10-02-demo-org-no-membership-request`.

## Tests
- Go: `include=updates` parsing, `updatesDays` validation, 7-day cap,
full window without `include`, distinct memo keys. The seam query parity
tests pass with the new SQL.
- status0 unit tests: 156 pass.
- status0 Playwright: 113 pass on a side-car server. New cases: delayed
stage 2, failing stage 2, locked page, default page stages, row height
kept when stage 2 lands, one call per refresh.
- `make lint-back`, status0 lint and typecheck green. Postgres layer not
run locally.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@fclairamb
fclairamb deleted the docs/specs-issues-492-495 branch October 26, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant