Skip to content

feat(scope-audit): transport view on the Scope Audit page (#2142, page) - #9

Closed
A13xB0 wants to merge 3 commits into
feat/2142-scope-transport-apifrom
feat/2142-scope-transport-ui
Closed

A13xB0 wants to merge 3 commits into
feat/2142-scope-transport-apifrom
feat/2142-scope-transport-ui

Conversation

@A13xB0

@A13xB0 A13xB0 commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Page half of upstream issue Kpa-clawbot#2142. Stacked on the API PR (feat/2142-scope-transport-api); review that first. With both, Kpa-clawbot#2142's acceptance points are covered.

Adds a Declared / Transport toggle to #/scope-audit. The transport view calls ?mode=transport and lists every repeater seen forwarding in the window:

  • Seen carrying: one chip per region scope with its packet count (first/last seen in the tooltip);
  • Declared: the repeater's declared regions coloured by whether they were seen carried (the declared view's own chips), or not asked when no declared-regions answer exists. Never asked is worded differently from declaring nothing;
  • Other traffic: unscoped, unmatched and ambiguous-hop counts.

A Region box (suggestions from the scopes seen) adds a Carries X column, lists the repeaters not yet carrying it first, and summarises carriers against active non-carriers: the rollout report the issue asks for. Window, view and region are deep-linked (#/scope-audit?window=7d&mode=transport&scope=sco) and survive a reload. The page says plainly that transported means seen carrying, not configured, and that over a short window a quiet region looks the same as a missing one. The intro text changes with the view.

Browser validation (pre-prod, real data)

Headless Chromium against pre-prod (copy of the production database, live feed):

  • #/scope-audit?window=24h: the declared view, 16 rows, as before.
  • Clicking Transport: 385 rows; the hash gains mode=transport.
  • Typing #ENG-NE in Region: normalised to eng-ne; the hash gains the region (now scope=eng-ne); summary "385 repeaters seen forwarding in the last 24h · 16 with a declared-regions answer · 51 carried eng-ne · 334 active but not seen carrying it"; the first rows are the non-carriers.
  • Reloading that hash restores view and region. Switching back to Declared hides the Region box and restores the declared intro. No page errors.
  • Checked at 1280 px and 390 px wide.

Two layout bugs found this way were fixed before opening: the region box inherited width: 100% from .nodes-search, and display: flex overrode the hidden attribute on the region bar.

Tests

tests/unit/test-frontend-helpers.js gains 10 cases on rendered markup and state, using the page's exported internals like the existing scope-audit tests: hash and API paths (and that a region never leaks into the declared view's link), region normalisation (#, capitals, empty), not asked vs declared chips (with the * wildcard), carried-scope chips with counts and the filtered region marked, the carries column only with a region, HTML escaping of names, the summary counts, region suggestions, and the per-view intro. 768 passing in that file.

Net-new UI surface, so per TDD.md the tests land in this PR rather than as a preceding red commit. Frontend suites on this branch: 193 of 194; the one failure, test-issue-1956-release-routing.js, needs CI's GITHUB_REF_NAME and fails identically on master locally (fixed by the upstream Kpa-clawbot#2149 PR in this fork). On the fork's combined integration branch (every open PR merged) all 195 pass.

Review notes

  • Colours only through existing CSS variables (no hex literals); the filtered region is marked with the link colour, not a new status colour.
  • The window note's wording is in the same spirit as the declared view's windowHonestyNote.
  • No API calls per row: one request per view/window/region, cached client-side for 30 s like the declared view.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H

@A13xB0
A13xB0 force-pushed the feat/2142-scope-transport-ui branch from 7d14cb3 to a240157 Compare October 10, 2026 00:11
@A13xB0

A13xB0 commented Oct 10, 2026

Copy link
Copy Markdown
Owner Author

Change after opening (commit a2401578, branch rebased onto the API PR's new head):

  1. The page now requests ?scope= and deep-links #/scope-audit?window=…&mode=transport&scope=sco, following the API rename. region= stays free for the observer IATA filter.

@A13xB0
A13xB0 force-pushed the feat/2142-scope-transport-api branch from c08c502 to 060668b Compare October 10, 2026 14:45
@A13xB0
A13xB0 force-pushed the feat/2142-scope-transport-ui branch from a240157 to df53e77 Compare October 10, 2026 14:45
@A13xB0

A13xB0 commented Oct 10, 2026

Copy link
Copy Markdown
Owner Author

This branch has been updated before going upstream:

  • rebased onto master (673442c);
  • test examples made generic (SJC/SFO/LAX, #be scopes);
  • SonarLint fixes added.

It's submitted upstream as Kpa-clawbot#2169. The description here predates those changes; the upstream one is current.

A13xB0 and others added 3 commits October 10, 2026 18:20
…t#2142)

Adds a Declared / Transport toggle to #/scope-audit. The transport view
calls ?mode=transport and lists every repeater seen forwarding in the
window:

- Seen carrying: one chip per region scope with its packet count;
- Declared: the repeater's declared regions coloured by whether they were
  seen carried (the declared view's chips), or "not asked" when no
  declared-regions answer exists;
- Other traffic: unscoped, unmatched and ambiguous-hop counts.

A Region box (suggestions from the scopes seen) adds a Carries column, puts
the repeaters not yet carrying the region first, and summarises carriers vs
active non-carriers: the rollout report. The window, view and region are in
the hash (#/scope-audit?window=7d&mode=transport&region=be). The page says
that "transported" means seen carrying, not configured, and that a quiet
region looks like a missing one over a short window.

Tests: 9 cases in test-frontend-helpers.js on rendered markup and hash state
(net-new UI surface: tests land in the same PR, per TDD.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H
Follows the API rename: the page requests ?scope=, deep-links
#/scope-audit?…&mode=transport&scope=be, and reads "scope" and
"carriesScope" from the response. region= is left for the observer filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H
- one modeQuery helper for the page hash and the API path (S3358, and
  the two copies were identical)
- the carries-scope cell is built before the row (S3358)
- localeCompare for the region suggestions (S2871), for-of and
  .dataset (S4138, S7761), optional chaining (S6582)
- object spread in the new helper tests (S6661)

No behaviour change; the helper tests are unchanged in what they assert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H
@A13xB0
A13xB0 force-pushed the feat/2142-scope-transport-api branch from 060668b to bb056a1 Compare October 10, 2026 17:22
@A13xB0
A13xB0 force-pushed the feat/2142-scope-transport-ui branch from df53e77 to 1fe44fb Compare October 10, 2026 17:22
@A13xB0 A13xB0 added live: pre-prod In the image running on CoreScope pre-production upstream: merged Merged into Kpa-clawbot/CoreScope master labels Oct 10, 2026
@A13xB0

A13xB0 commented Oct 10, 2026

Copy link
Copy Markdown
Owner Author

Merged upstream as Kpa-clawbot#2169 (2026-10-10T19:22:38Z). Closing; master will be synced from upstream.

@A13xB0 A13xB0 closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

live: pre-prod In the image running on CoreScope pre-production upstream: merged Merged into Kpa-clawbot/CoreScope master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant