wu-sheng opened a new pull request, #13:
URL: https://github.com/apache/skywalking-horizon-ui/pull/13

   ## Summary
   
   Three threads of work shipped together because they share the same wire
   + UI surfaces:
   
   1. **BanyanDB cold-stage query** — reach OAP's cold lifecycle stage
      from the UI, with a loud trap banner so operators don't ask cold for
      recent data and see widgets go empty.
   2. **TTL page rewrite** — per-data-class lifecycle bar that visualises
      hot+warm vs cold across every class, branched sharply by backend.
   3. **Overview widgets honor the global time picker** + a few related
      picker / locale / labelling fixes that surfaced during testing.
   
   ## Why these are together
   
   The cold-stage trap (querying cold while looking at a recent window
   returns nothing) is most discoverable on the overview Services
   Dashboard and the layer dashboards — and both of those were quietly
   ignoring the topbar time picker pre-fix. Fixing one without the other
   left the trap easier to walk into. The TTL page makes the lifecycle
   the operator is reasoning about visible, so the cold pill stops being
   a mystery toggle.
   
   ## Cold-stage query
   
   - Topbar **`Cold` pill** renders only when the connected OAP is
     BanyanDB. Toggling it switches every page to read from cold instead
     of hot + warm (it **replaces** the read, doesn't union — that's
     OAP's semantics). Pill label flips to `Cold only` while on, sticky
     per browser, flipping invalidates the visible queries so subscribers
     refetch in the new mode immediately.
   - **Cold-trap banner** under the topbar: when the pill is on AND the
     time range is within the hot + warm window, a yellow strip explains
     why the page is empty + offers a one-click *Turn Cold off*.
   - **Trace lookup from a log row** now passes the row's timestamp
     through the popout URL so the trace search spans a window around
     it — paired with the Cold pill, a trace that lives in cold resolves
     from a cold-era log row instead of silently failing.
   
   ## TTL page
   
   - Per-data-class **lifecycle bar**: one row per class (Normal, Trace,
     Log, Metadata, Minute metric, …) with Hot + Warm and (when present)
     Cold segments, widths proportional to total retention across all
     rows. Rows collapse to `All records (5)` / `All metrics (4)` when
     every class in a category shares the same TTL pair — non-BanyanDB
     always satisfies this.
   - **Branches sharply by backend**. BanyanDB shows the full lifecycle
     bar + stage vocabulary. Other backends render a single `Retention`
     pane with per-class values and skip stage vocabulary entirely.
   - Footer note names the wire-level truth (hot + warm collapse,
     segment-migration overlap, property omitted).
   
   ## Overview widgets follow the topbar time picker
   
   - `POST /api/layer/:key/landing` + `GET /api/layer/:key/topology` now
     accept `step/startMs/endMs`. The overview composable + per-layer
     topology composable thread the picker through; the layer dashboard
     header KPIs follow too (was showing live numbers while the body
     honored the picker).
   - Time-picker custom range now seeds from the **last applied range**
     and auto-expands the Custom form when current is custom.
   - Locale-bleed fixed on the alarms-page custom-range stamp + the log
     row date column.
   - Active alarms widget title shows the actual window (e.g.
     `· last 10m`) instead of a fixed "last 60m".
   
   ## BFF surface
   
   New shared utilities:
   - `apps/bff/src/util/window.ts` — `Window`/`TimeStep`/`fmtForStep`/
     `windowFromRange`/`defaultMinuteWindow`. Single source of truth for
     date-string format ↔ Duration.step pairing (OAP rejects mismatch).
   - `apps/bff/src/util/duration.ts` — `onRequest` hook reads the
     cold-stage header; `withColdStage(req, duration)` splices
     `coldStage: true` into Duration variables.
   - `apps/bff/src/logic/oap/backend.ts` — classifies the connected OAP
     as `banyandb` / `other` / `unknown` from its TTL response shape,
     exposed on `/api/oap/info` so the UI can gate BanyanDB-only
     affordances.
   
   `coldStage` plumbed through every route that builds a Duration:
   alarms (list + count, v1 + v2), trace (queryTraces, queryTrace
   by-id), log (page + facets), dashboard (widgets + auto-pick
   instance / endpoint), topology, endpoint-dependency, endpoint,
   instance, ebpf, landing.
   
   ## Polish
   
   - Sentence-case fixes (`DSL management`, `Metrics inspect`) across
     sidebar / roles / cluster status / DSL warning / catalog kicker.
   - Public-demo references removed from `docs/setup/oap.md` (demo
     doesn't accept anonymous traffic).
   - API/protocol references removed from operator-facing copy on the
     TTL page.
   
   ## Validation
   
   End-to-end against the demo OAP (`demo.skywalking.apache.org:12800`,
   BanyanDB-backed):
   
   - `/api/oap/info` returns `backend: "banyandb"` ✓
   - `/api/oap/ttl` returns `backend` + per-class `stages.hot`/`stages.cold` ✓
   - Cold-stage A/B (`agent::rating`, HOUR step, `2026-05-12 03 → 06`):
     - `coldStage: false` → 0/7 buckets (data is past hot+warm) ✓
     - `coldStage: true`  → 7/7 buckets with values ✓
   - Overview landing route honors picker + cold header end-to-end ✓
   - Topology route honors picker + cold header end-to-end ✓
   - `queryTrace(traceId, duration:…)` accepted by OAP without schema
     error ✓
   
   Tests: BFF 80/80 pass · UI 69/69 pass · vue-tsc clean both apps ·
   ESLint clean both apps · license-eye clean (550 files checked).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to