Files
openobserve/web/src
Ashish Kolhe 262b346af1 chore: make "switch back to Logs" discoverable in stream explorer (#13256)
## Problem

Opening the Streams list → filtering to a non-logs tab
(Metrics/Traces/Enrichment) → clicking the explore icon on a row lands
the user in the **Logs explorer** with that stream type. The only way
back to Logs was an icon-only ghost button in the sidebar that:

- rendered the **current** stream type's icon (e.g. bar-chart for
metrics), so it read as a passive *label*, not an action;
- exposed its meaning only via a tooltip;
- did the *opposite* of the icon shown (icon = where you are, click =
leave).

Meanwhile the prominent, labeled **Reset** button doesn't reset stream
type, so it's a decoy. Result: users get stranded in the Logs explorer
showing a non-logs stream (this was hit during DevRel testing).

## Fix

Replace the ambiguous badge with a clear **`swap-horiz` (⇄) switcher
icon** button, separated from the stream picker by a gap, with an
action-first **"Switch back to Logs"** tooltip.

**Behavior is unchanged** — the control is still gated on `streamType
!== 'logs'`, and one click still calls `onStreamTypeChange('logs')`. No
routing, service, or store changes.

### Before / After

| | |
|---|---|
| Before | ambiguous type-icon badge, tooltip-only meaning, cramped |
| After | `⇄` switcher icon, gap before the picker, action-first tooltip
|

## Housekeeping in the same file
- Migrated the banned legacy `--o2-border` token → `border-default`
design token.
- Removed the now-unused `streamTypes` / `streamTypeIcon` /
`streamTypeLabel` helpers.

## Tests
- Added focused unit tests in `IndexList.spec.ts`: control hidden when
type is logs, shown for non-logs, uses the `swap-horiz` icon, and click
still triggers `onStreamTypeChange('logs')`.
- Full `IndexList.spec.ts` suite passes (125 passed).

## Scope
One component (`web/src/plugins/logs/IndexList.vue`) + one i18n key.
Pure OSS frontend — no backend / enterprise gating.
2026-07-18 07:29:47 +00:00
..
2026-07-17 23:27:52 +00:00
2026-07-17 23:27:52 +00:00
2026-07-17 23:27:52 +00:00
2026-05-28 11:00:49 +00:00
2026-07-17 08:58:47 +00:00
2026-07-17 08:58:47 +00:00
2026-07-17 15:56:35 +00:00
2026-07-17 23:27:52 +00:00
2025-12-05 15:43:51 +05:30
2026-07-17 06:25:47 +00:00