- Test the 401 login fallback when the body is not JSON.
- Flag bare sendBeacon calls and parse .js, .mjs and .cjs as JavaScript.
- Record the change-password 403 in the CHANGELOG.
- change-password returns 403 for a wrong current password and keeps 401
for an invalid or expired session, like authInit's bad setup token.
- apiFetch only treats a 401 from /auth/login as bad credentials; every
other 401 clears the session and returns to /login.
- Tests cover change-password with an expired session and with a wrong
current password, and the direct-network check parses the AST so
comments, strings and test files cannot produce false positives.
- apiFetch treats a 401 from /auth/* as bad credentials, not as an
expired session: the session is kept and the server message is
exposed instead of reloading /login.
- Test the openSSE constructor wiring, the login 401 path, the absence
of Content-Type on the three FormData uploads, and broaden the direct
network check to window/globalThis/self fetch, XMLHttpRequest,
EventSource and sendBeacon in .js, .mjs, .cjs and .jsx files.
With the category Combobox of the New task sheet open, an overlay click
closed the whole sheet: isRadixOverlayOpenNow did not match the Base UI
popup, whose open state is data-open, not data-state. Add
[data-slot='combobox-content'][data-open] to the selector.
Add web/src/lib/utils.test.mjs, run by test:reducers: a DOM-free test of
preventDismissUnlessOverlayClick with a stub document, covering Select,
popper content, Combobox, menu triggers, the open sheet/dialog trigger
and an expanded Collapsible. The alias loader now adds the JSON import
attribute so tests can import modules that depend on @/i18n.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
http() and twelve calls that used fetch directly (uploads, downloads,
exports, the report, tool-config and the logs history) each built their own
Authorization header. Only http() and the HAR export handled a 401, with two
inline copies of the session clean-up, and openSSE had a third.
All of them now use apiFetch (src/lib/api-fetch.ts):
- 401: clearSession() (src/lib/auth.ts) drops the token and the cookie and
goes to /login, then the call throws, as http() did before.
- 403: throws ForbiddenError, an ApiError with status 403 and the server's
message, ready to show in a toast.
ApiError moves to api-fetch.ts and is still exported from api.ts. The SSE
client keeps its own fetch and now calls clearSession on a 401.
Regenerated cleanly on top of #603 (becc47a + reducers + #641/#660/W01/
openai-compatible) without touching Go files or locale JSONs:
- formats and organizes imports across web/ with Biome 2.5.1
- fixes blocking lint/a11y/promise/hook-dependency diagnostics (including
public/logo.svg <title> required by lint/a11y/noSvgWithoutTitle)
- enforces blocking `npx biome ci .` in the web CI job.
Co-authored-by: AseemPrasad <aseemprasad0520@gmail.com>
Rebased onto origin/main (becc47a) keeping URL query state (useQueryState /
useRecordHistory from #641) as the single source of truth across all six
function pages (assets, commands, findings, llm-records, traffic, workspace):
each reducer initializes from and resynchronizes with the URL (including
back/forward), and handlers write to the URL then dispatch.
Preserves all existing web test scripts and wires test:reducers into CI and
scripts/verify.sh.
Co-authored-by: sisantaChhatoi <sisantachhatoi@gmail.com>
Rebased on top of Lot 1 security stack (#660): keeps both test:sse and
test:navigation in web/package.json.
Co-authored-by: renaesop <njurjs@gmail.com>
Applies #660 (remove ?token= query extraction, switch web SSE to fetch+
Authorization Bearer, drop client-written auth cookie) cleanly on top of #633's
same-origin CORS policy. Preserves #633's same-origin ACAO + Vary: Origin while
allowing Authorization and Last-Event-ID on same-origin preflights, aligns
openSSE 401 cookie clearing attributes, and updates the upload.test.mjs and
traffic-stream.test.mjs harnesses for @/lib/sse (SSEStream stub + EventTarget,
Event, MessageEvent, AbortController in VM context).
Co-authored-by: Coff0xc <184964491+Coff0xc@users.noreply.github.com>
Reset the stream panel's filter and request state when the exchange changes.
Keep recording-limit warnings visible while reporting only actual messages
in the header, including first-page and warning-only counts.
Add message_total to the stream page without changing raw pagination totals
or existing Go paging signatures. Cover the count and pagination boundaries
in the stream and HTTP route tests.
t() looked a key up with dict[key] ?? key, so t("constructor") returned
Object and t("toString", {}) threw. Backend values are used as keys, so
this was reachable. Use an own-property check for the dictionary and the
vars, and commit the key-check script as npm run test:i18n in the web
job so tr.json cannot drift.
Every user-visible string in the web UI now goes through t() from
web/src/i18n. The English source text is the key, so a missing entry
falls back to English and nothing breaks; Turkish lives in one flat
file, web/src/i18n/locales/tr.json (about 2,600 entries).
The locale is chosen once per page load: a saved choice, else the
browser language, else English. Switching (new Language toggle under
Preferences) stores the choice and reloads, so t() also works in module
constants, helpers and toasts without hooks.
Also:
- hard-coded zh-CN / implicit date locales now follow the UI language
- sentences assembled from fragments became single templates
- "Toujours autoriser" in approval records is now English
- upload.test.mjs stubs the new @/i18n import
Values sent to the API or compared in code, agent prompts, and backend
messages are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a Replay tab to the traffic detail sheet, backed by
POST /api/traffic/replay (#258). The form starts from the selected
exchange: method and URL from the exchange, headers and body from the
recorded request. Host is taken from the URL and not editable; headers
the server drops (hop-by-hop, Content-Length, Proxy-Authorization, and
those named in Connection) are left out and listed. A binary body
(NUL byte) disables Send. The response shows status, duration,
truncation, a passthrough warning when it was not recorded, the sorted
headers and the raw text; a recorded replay refreshes the list.
http() now throws ApiError, an Error with the HTTP status, so the tab
can tell 413, 502, 503 and 504 apart. parseRawRequest and
splitReplayHeaders live in lib/replay.ts with node tests run in CI
(test:replay). Stream exchanges show the tab disabled.
Adds setVisibleInterval (web/src/lib/polling.ts): no ticks while the tab is hidden, an immediate refresh on return, no overlapping polls, errors swallowed, cleanup removes the listener. API pollers use it; local clock ticks keep setInterval. CI runs the helper tests. Backported from #209 (contributed by @renaesop).