Files
hermes-krates-connector/design/spotlight.md
2026-06-16 08:31:55 -04:00

2.5 KiB
Raw Blame History

Spotlight Feature

Purpose: Global search overlay that lets users find any Kubernetes object, existing krates, namespaces, or collection categories, and open specific views.

Trigger:

  • Click on empty canvas.
  • Type any printable key when no input is focused (preseeds query).
  • / key opens an empty spotlight.

Layout:

  • Fullscreen dark backdrop rgba(7,9,13,.55) with backdropfilter: blur(2px).
  • Centered panel (max660px, 93% viewport width) with background rgba(16,20,28,.97), border 1px solid rgba(140,165,200,.26), borderradius 14px.
  • Input row (≈52px high) containing:
    • Search glyph (accent color).
    • Optional typefilter pill.
    • Text input (fontsize18px, IBM Plex Sans).
    • Optional Tabghost hint.
  • Horizontal type chips row (scrollable on narrow screens) for all object kinds (pods, svc, deploy, secret, cm, sts, …).
  • Results list (maxheight48vh, overflowauto) each row shows:
    • Shape glyph (typespecific).
    • Name.
    • Subtext type · ns/namespace.
    • CRD badge if applicable.
    • Type badge.
  • View chips appear on the selected result only: ⌥L logs · ⌥S shell · ⌥D describe · ⌥Y yaml. Views are limited to object capabilities (e.g., logs & shell only for pods, deployments, daemonsets, statefulsets).
  • Footer hint line.

Fuzzy Search Algorithm (used in the prototype):

  • Score = charactermatch score×10 + type boost.
  • Type boost values: crd60, deployment50, statefulset48, service46, daemonset44, ingress42, secret24, configmap22, pvc18, pod16.
  • Character match: sequential chars, +3 for consecutive, +5 for wordboundary start.
  • Top8 results displayed.

Tab QuickFilter:

  • Typing a type alias (pod, svc, deploy, etc.) shows a ghost hint ⇥ Pods.
  • Press Tab to lock filter as a pill; Backspace removes it.
  • Tab also cycles through recently used type filters (mostrecent first).

Keyboard Shortcuts (Alt/Option required):

  • Alt+L = open Logs view for selected result.
  • Alt+S = open Shell view.
  • Alt+D = open Describe view.
  • Alt+Y = open YAML view.
  • Enter = open default view (logs for pods, describe for workloads, yaml for config resources) and close spotlight.
  • Esc = close spotlight; if a krate was summoned it is placed on canvas.
  • ↑/↓ = navigate results.
  • Tab = apply/cycle type filter.

AutoClose: after 500ms of keyboard idle the spotlight autocloses and the camera flies to the newly created krate.