Skip to content

DO NOT MERGE — merge train A: 3482,3481,3480,3479,3476,3475,3474,3473 - #3500

Closed
vybe wants to merge 17 commits into
devfrom
train/20261009-2301-a
Closed

vybe wants to merge 17 commits into
devfrom
train/20261009-2301-a

Conversation

@vybe

@vybe vybe commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Integration surface for #3482, #3481, #3480, #3479, #3476, #3475, #3474, #3473. Never merged; members merge individually once green.

trinity-ability and others added 17 commits October 9, 2026 18:04
…ows the list filter (#3449)

The notifications store recomputed `pendingCount` from the rows the
Notifications tab had loaded (`updatePendingCount()` at the end of every list
fetch). That list is filtered and capped at one page, so choosing a status or
an agent, or just loading the default 50-row page, rewrote the Operations
header, the Notifications tab badge and the NavBar badge.

`pendingCount` is now written only from the existing count endpoint
(`GET /api/notifications/count`, #1143) plus the optimistic +/-1 of a live
event or a row verb. A first-page list fetch re-reads the count beside it
instead of deriving it. Acknowledge / dismiss take one off only when the row
was pending, so dismissing an acknowledged row under a filter no longer moves
the badge. The panel's third card said "Total" over a page-capped row count
next to the global Pending figure; it now says "Shown" and counts the rows
rendered.

Test: tests/unit/notificationsPendingCount.spec.js (store with the HTTP client
stubbed, plus a mount of NotificationsPanel). Mutation check: with
stores/notifications.js reverted all 7 cases go red; with only the panel
reverted the mounted case goes red.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nt breaker (#3450, #3452)

#3450 — the header printed `alerts.length` ("Active Alerts (50)") while the
list iterated `alerts.slice(0, 5)` with no expander, so 45 alerts were
counted and unreachable. Every alert is now rendered inside a bounded,
keyboard-focusable viewport (max-h-72 + internal scroll, about the five rows
the panel always showed), so the stated count is the reachable count and the
page does not grow.

#3452 — `GET /api/monitoring/status` already carries the per-agent transport
breaker map (`circuit_breakers`), but the monitoring store never kept it and
the panel never rendered it, so no breaker state was visible at all — DORMANT
included. The store now keeps it and each agent row whose breaker is not
closed carries a BaseBadge naming the state ("Breaker dormant" / "Breaker
open") plus the failure count in the row's meta line. No backend change.

Tests: tests/unit/monitoringPanelAlertsBreaker.spec.js mounts the panel over
a real Pinia and the real store (HTTP client stubbed). Red under mutation:
- restoring `.slice(0, 5)` -> "renders one row per alert, so the stated
  count is the reachable count" and "contains the list in a scrollable,
  keyboard-reachable viewport instead of growing the page"
- dropping `max-h-72 overflow-y-auto` -> the viewport test
- store not keeping `circuit_breakers` -> "a DORMANT breaker reads as
  dormant, with its failure count" and "an OPEN breaker is shown too; a
  closed or unreported one adds nothing"
- treating dormant as nothing-to-say -> the DORMANT test

Fixes #3450
Fixes #3452

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ckup status (#3453, #3454)

#3453 — Settings resolved `?tab=` once at setup against a tab list that
filters on entitlements, which load after setup; the only watcher followed
the URL, which had not changed. A refresh or deep link on an
entitlement-gated tab therefore showed the default tab under a URL that
still named the gated one. The resolution moves to `useQueryTab`, which
re-applies the URL's tab when the offered set changes. It does not do so
once the user has clicked a tab — including a click on the tab already
shown, which changes neither the tab nor the URL — and it never rewrites
the URL while the set is unknown. A tab that is still not offered after
the load leaves the default in place.

#3454 — `GET /api/settings/retention` has returned a `backup` block since
#2216 and nothing rendered it. `BackupStatusPanel` shows it on the
Retention tab from the response the tab already fetches: one state badge,
last successful backup (UTC-parsed, relative with absolute on hover),
recovery points, location with the same-disk boundary, schedule and
retention. A failed or skipped attempt outranks an older success; a
missing `backup` key and `{"error": "unavailable"}` each say what they
are; loading is "no response yet" with the rows reserved.

Tests red under mutation, restored byte-identical:
- queryTabRestore.spec.js "becomes active once the entitlement that
  reveals it arrives" — offered-set watcher removed (also red against the
  pre-fix logic extracted unchanged)
- queryTabRestore.spec.js "a click on the tab already shown counts as a
  choice too" — user-chose guard removed
- backupStatusPanel.spec.js failed / skipped / stale / never-run / off —
  state forced to Healthy
- backupStatusPanel.spec.js "no backup key" and "could not build" —
  both treated as a normal block
- backupStatusPanel.spec.js "before the response arrives it holds its
  footprint and claims nothing" — loading state removed

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r, channel dialog import (#2900, #3446, #3447)

#2900 — `?tab=` was read on arrival and never written, so Back left the agent
page, a reload fell back to Overview, and a tab could not be linked. The tab
ref is now bound to the query by `composables/useTabRoute.js`: a tab change
pushes `?tab=` (Back steps through tabs), a Back/Forward step on the page
writes the ref, and the normalising writes replace — the fallback off a tab
the viewer cannot see, the agent-switch reset, and a bare URL catching up with
the tab a KeepAlive-cached view remembered. The two handlers that selected
Tasks and then wrote `?execution=` separately now do it in one navigation; two
would cancel each other.

The #2130 guard is untouched and still decides the late reconcile. The binding
adds one writer to the tab — a history step on the same page — and compares a
new selection against the write still in flight rather than the stale URL, so
a navigation that lands late cannot bounce the user to a tab they left.

#3446 — the floating help launcher sat on the Chat composer's Send button.
`/agents/:name` names the tab in `meta.hideHelpLauncherOnTabs`; App.vue passes
it to the widget as `hide-launcher`. Only the closed launcher stands down, and
only on that tab: an open help conversation holds unsent state and survives a
click on Chat.

#3447 — `ChannelConfigRow` rendered `<ChannelConfigDialog>` without importing
it, so Vue warned per row and the channel form rendered inline in the row.
The component exists; it is imported.

Tests (all mounted; each went red with its fix reverted, then restored
byte-identical):
- agentDetailTabUrl.mount.spec.js — AgentDetail.vue at HEAD: 7 of 8 red
  (AC1-AC4, the Overview handlers, both #2130 reconcile cases); fallback as a
  plain assignment: "replaces the dead link" red; handleOpenTask as two
  writes: "ONE navigation carrying tab and execution" red.
- agentTabRoute.mount.spec.js — in-flight comparison removed: "click A then
  straight back to the original tab" red (+2); push forced to replace: 4 red.
- helpWidgetChatTab.mount.spec.js — route meta removed: 3 of 5 red; widget
  ignoring `hideLauncher`: 3 of 5 red.
- channelConfigRowDialog.mount.spec.js — import removed: 3 of 4 red.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…any row (#3455, #3456)

#3455 — POST /api/settings/email-whitelist only lower-cased its input, so
`a@`, `@b.com` and a 10 000-character string were stored as "emails" (and a
body that was not a JSON object was a 500). The field is type=email but sits
outside a <form>, so the browser's own check never ran either.

- `db_models.EmailWhitelistAdd` trims and lower-cases `email` and refuses
  anything that is not ONE address: empty, over 254 characters, containing
  whitespace or control characters, or not exactly one `@` with text on both
  sides. The whitelist is matched by exact lower-cased address — there is no
  domain or wildcard entry form — so nothing supported is refused. The check
  is deliberately the minimal one ScheduleCreate uses (intranet and
  internationalised addresses stay valid); `email-validator` is available but
  its special-use-domain rules would refuse `user@localhost`.
- The route answers 422 with a one-sentence string `detail` naming the reason
  (never Pydantic's error array, never the echoed value).
- The same rule runs client-side (`utils/emailWhitelist.js`) inside a new
  settings-store action, which rejects before any request; Settings.vue shows
  the reason — the client rule's or the server's — beside the field with the
  InlineError primitive. The address cell wraps instead of stretching the
  table, so a pre-existing oversized row keeps its Remove button in reach.

#3456 — DELETE /api/settings/email-whitelist/{email} had no path converter.
The router decodes %2F before matching, so a stored value containing `/`
(a legal local-part character, and present in rows that predate validation)
matched no route and could never be removed. The parameter is now
`{email:path}`; nothing else is registered under /email-whitelist/, so it
claims no sibling (Invariant #4). The client already sent the value as one
encoded segment; that now lives in `whitelistEntryUrl` and is pinned.
`test_1028_settings_package.py` records the path-string change explicitly in
`_RESHAPED_SINCE_SPLIT` rather than editing the frozen fork-point literal.

Mutation-checked — each fix reverted, tests red, restored byte-identical:
- validator removed -> 15 red in tests/unit/test_3455_email_whitelist_validation.py
  (test_a_value_that_is_not_one_address_is_refused_with_a_named_reason, …)
- router 422 mapping removed -> 19 red (same file, incl.
  test_a_malformed_body_is_a_422_not_a_500)
- `:path` removed -> 9 red (test_a_stored_value_is_removable_when_sent_url_encoded,
  test_delete_keeps_its_admin_gate)
- store pre-check removed -> 9 red in src/frontend/tests/unit/emailWhitelist.spec.js
  (store "does not POST …" and the mounted "an invalid entry … sends nothing")
- encodeURIComponent removed -> 7 red (incl. mounted "Remove on a row
  containing a slash DELETEs its encoded value")
- Settings.vue posting directly / dropping InlineError / reporting to the page
  banner -> 6 red each (mounted Settings.vue tests)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ing at narrow widths (#3454)

Found in the UI pass at 768 px: the same-disk caveat was cut off with an ellipsis.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…f saving it (#3459)

Esc left edit mode, the field's removal blurred it, and the blur handler
saved any draft that differed from the stored title, so the abandoned text
became the title. The blur handler now ignores a blur that arrives once the
editor has already left edit mode, which is the editor's own teardown and
not the person leaving the field. The same guard stops Enter from saving a
second time when the stored title has not caught up by the time the field is
removed. Esc also returns focus to the pencil that opened the editor.

Enter and a blur with a changed draft still save; a blur with an unchanged
draft is still an abandon. The fix is in PortalEditableTitle, so it holds for
the sidebar row, the 1:1 header and the room header.

Test: tests/unit/portalEditableTitleEsc.mount.spec.js mounts the component
attached to the document. With the fix reverted, "Esc discards the draft: no
save, and the stored title is shown again", "Esc hands focus back to the
pencil, and reopening starts from the stored title" and "Enter saves the
trimmed draft exactly once, even through the teardown blur" go red.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…wide enough for it (#3465)

At a 768 window with the systems rail open the list is about 496px wide.
The tablet row switched on a viewport `md:` alone, and its second line
(three reserved toggles, success bar, capacity meter, task counts) needs
about 610px: the `flex-1 min-w-0` success cell collapsed to 0 with its
percentage painted over the meter, and the no-wrap task counts ran
50-67px past the row's right edge.

The tablet row now also requires the list container to be at least 40rem
(`list-mid:`, a second variant on the existing `agent-list` container the
desktop grid already queries); below that the compact row renders, the
one every window under 768 already gets. Nothing changes below `md`, at a
768 window with the rail collapsed (664px), or at 1440 (desktop grid).
`list-mid` is registered before `list-wide` so `md:list-wide:hidden` is
emitted after `md:list-mid:flex`.

Test: tests/unit/agentListLayoutSwitch.spec.js mounts AgentListPanel,
compiles the rendered classes through the real tailwind.config.js and
resolves the `display` cascade per (window, list) width. Red under
mutation: reverting the fix fails "the reported case: a 768 window with
the rail open gets the compact row" (expected ['md'] to equal ['base']);
registering the variants in the other order fails the every-width case
(['lg','md'] at a 1088px list). e2e/dashboard-list-view.spec.js gains the
browser-side geometry case (no cell overlaps or leaves its row at 768,
rail open and collapsed).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r names the message limit before sending (#3458, #3460)

#3458 — a 3000-character unbroken token drew a user bubble ~27,900px wide.
The bubble is a fit-content box (an items-end column child) and fit-content
never goes below min-content, which for an unbreakable token is its whole
length. Every Workspace bubble now carries `overflow-wrap: anywhere`
(`portalBubble.js::BUBBLE_WRAP_CLASS`) — the user bubble in the chat, the
voice-call block, the Inbox pane and the room, and the agent bubble, where it
is inherited by the rendered markdown. `anywhere`, not `break-words`: only
`anywhere` lowers min-content. Measured in Chrome on the same structure:
22,751px before, 22,751px with break-word, 360px with anywhere. Tables keep
their own horizontal scroll (PortalMarkdown already resets the cells).

#3460 — the server bounds a chat message at 8000 characters and the composer
enforced nothing, so an over-long message came back as "error 422" with the
words already cleared. The composer now shows a count for the last 500
characters and, past the limit, a named refusal with Send held (button and
Enter both). If the server still refuses a message as invalid, the reason is
said in words with the server's own number, no Retry is offered (the same
words earn the same answer), and the draft is handed back to the composer.
The client number lives in `portalMessageLimit.js` and is pinned to
`PortalChatRequest.message` by a test that reads the backend model. Length is
counted in code points, as Python's len() counts it.

Tests (each went red under mutation, then green on a byte-identical restore):
- portalBubbleWrap.mount.spec.js — all 3 red with the wrap class emptied, and
  with `break-words` in its place.
- portalMessageLimit.mount.spec.js —
  "an over-limit draft cannot be sent, and the limit is named" red without the
  send() guard, without the button's disabled term, and without the notice;
  "shows the reason in words, keeps the draft, and offers no pointless Retry"
  red without the refusal branch and without the draft restore;
  "equals PortalChatRequest.message max_length" red when the client constant
  drifts to 8001.

portalVoiceMode.spec.js: the source pin on Send's `:disabled` expression is
updated for the appended limit term.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui PR touches the frontend UI — triggers Playwright e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants