mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 16:10:43 +00:00
## 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.