Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
305 lines (265 loc) · 12.8 KB

File metadata and controls

305 lines (265 loc) · 12.8 KB
Copy raw file
Download raw file
Outline
Edit and raw actions
tokens
colors spacing layout typography borders elevation motion
brand brand_light loop loop_light task task_light project project_light semantic status bg text border
value description
#fbbf24
App name, input bar accent, generic UI elements, modal borders, command palette highlights
value description
#d97706
Light theme brand variant
value description
#38bdf8
Loops tab: panel borders, selected row indicator, status dots, title text
value description
#0284c7
Light theme loop variant
value description
#a78bfa
Tasks tab: panel borders, selected row indicator, chain editor accent
value description
#7c3aed
Light theme task variant
value description
#34d399
Projects tab: panel borders, selected row indicator, search mode accent
value description
#059669
Light theme project variant
success success_light warning warning_light danger danger_light idle idle_light
value description
#4ade80
Exit code 0, running status spinner, success toasts, streak indicators
value
#16a34a
value description
#facc15
Paused status, warning toasts, debug panel border, last-failure indicator
value
#ca8a04
value description
#f87171
Exit code non-zero, stopped status, destructive actions, confirm mode accent bar, error toasts
value
#dc2626
value description
#fb923c
Idle loop status, pending action indicator
value
#ea580c
running waiting paused idle stopped
value description
#4ade80
Maps to semantic.success
value description
#6b7280
Maps to text.muted
value description
#facc15
Maps to semantic.warning
value description
#fb923c
Maps to semantic.idle
value description
#f87171
Maps to semantic.danger
base surface elevated hover active input
value description
#0a0e14
Root application background
value description
#111827
Panel backgrounds, debug panel
value description
#1e293b
Modal backgrounds, toast backgrounds, command browser
value description
#1e3a5f
Hover background overlay (defined, minimal usage)
value description
#1e3a8a
Selected row background, focused button fill, dropdown focused row
value description
#0f172a
Focused input field background
primary secondary muted inverse
value description
#e5e7eb
Normal text content, field values, list items
value description
#9ca3af
Labels, secondary descriptions
value description
#6b7280
Hints, placeholders, column headers, status bar labels, dot separators
value description
#ffffff
Text on active/selected backgrounds (high contrast)
default dim
value description
#1e293b
Panel borders at rest, unfocused state
value description
#374151
Unfocused input/button borders, command input container border
xs sm md lg xl
value description
1
Tight padding inside list items, between indicator and content
value description
1
Padding left/right inside panels, gap between tab labels
value description
2
Modal padding, form field spacing
value description
4
Welcome screen padding
value description
4
Maximum spacing unit
left_panel_width right_panel_width debug_panel_width command_input_height dropdown_max_visible modal_default_width log_modal_width commands_browser_width
value description
60%
Left panel (list) width with flexShrink=0
value description
40%
Right panel (detail) width
value description
22%
Debug panel width when debug mode is on
value description
6
Bottom command input total height in rows
value description
6
Maximum visible items in command autocomplete dropdown
value description
60%
Default modal width
value description
95%
Log viewer modal width
value description
56
Commands browser modal width in characters
font_family heading body hint
value description
monospace
Terminal system default monospace font
weight description
bold
Tab labels, modal titles, app name, section headers
weight description
normal
List items, field values, input text
weight fg description
normal
#6b7280
Placeholders, key hints, status labels
panel modal accent_bar
style description
single
Single-line box drawing for LeftPanel, RightPanel, Navigator lists
style description
round
Rounded corners for modal dialogs, toast notifications
char description
Left vertical accent bar in CommandInput (brand color for command mode, danger for confirm, project green for search)
base surface elevated floating
bg description
#0a0e14
Root level
bg description
#111827
Panel level
bg description
#1e293b
Modal overlay level
position description
absolute
Toasts (bottom-right) and command dropdown (above input) use absolute positioning to float over content
spinner spinner_color toast_timeout toast_max
type description
dots
ink-spinner dots animation for running loops inline in the list
value description
#4ade80
Green semantic.success for running status spinner
value unit description
3500
ms
Auto-dismiss duration for toast notifications
value description
4
Maximum simultaneous visible toasts

Design System

Design Philosophy

loop-task is a command-first terminal application built on Ink 7 + React 19. The design rejects the "web app in a terminal" metaphor in favor of CLI-native patterns: a persistent command input at the bottom, keyboard-only navigation, and inline information density.

Inspired by lazygit, Claude Code, and gh, the UI prioritizes:

  • Always-focused input at the bottom where all actions begin
  • Tab-based context switching (Loops / Tasks / Projects) with distinct accent colors
  • Two-panel layout (list left, detail right) with Tab cycling between them
  • Floating elements (toasts, dropdowns, modals) that overlay content without pushing layout
  • Minimal chrome - one status line header, one hint line footer, no decorative borders

Color Philosophy

The palette is intentionally limited to 4 primary colors + 4 semantic + grays. No decorative colors exist outside this set.

  • Brand (amber #fbbf24) is the generic accent for UI elements that don't belong to a specific entity: app name, input bar, modal borders, command palette highlights.
  • Loop (blue #38bdf8), Task (purple #a78bfa), Project (green #34d399) are entity-specific. When the active tab changes, the panel borders, filter labels, and selected-row indicators all shift to the active entity's color via tabAccentColor().
  • Semantic colors (success/warning/danger/idle) are reserved for status communication - never decorative.
  • Grays form a 6-tone background scale and 4-tone text scale. Selected rows use bg.active with text.inverse for maximum contrast.

Layout Architecture

The board view is a vertical stack:

  1. Header (3 rows): App name + tagline, daemon status + loop counts + tab bar, separator line
  2. Content area (flexGrow, full terminal width): Wide terminals (>=110 columns) use a LeftPanel (60%) + RightPanel (40%) row. Compact terminals (70-109 columns) stack full-width panels. Minimal terminals (<70 columns) show the full-width navigator only. DebugPanel follows the active layout direction.
  3. Command input (6 rows): Bordered box with accent bar, input line with inline placeholder, and hint bar

Panel Focus Model

Panels receive focus via the isFocused prop (not Ink's native useFocus()). When focused:

  • Panel border shifts to the active tab's accent color
  • Arrow keys navigate within that panel's list
  • Tab/Shift+Tab toggles between left and right panels (never into header or input)

When any modal is open, isFocused is false for both panels - blocking all arrow key input from reaching the lists behind the modal.

Command Input

The bottom input is the heart of the interaction model. It has three modes, each with a distinct accent bar color:

  • Command mode (amber ): Fuzzy autocomplete via ink-combobox headless hooks. Dropdown floats above the input with position="absolute". Placeholder: "Start typing an action or say help..."
  • Confirm mode (red ): Destructive commands transition here. Shows the confirmation prompt, offers yes/cancel options. No text input - only navigation.
  • Search mode (green ): Typing "search" + Enter transitions here. Filters the active list in real-time. Placeholder: "Write something to filter about..."

The input ignores all Ctrl key combos (if (key.ctrl) return) - these are handled by the global useInput in App.tsx for shortcuts like Ctrl+N (new), Ctrl+E (edit), Ctrl+D (delete), Ctrl+P (commands browser), Ctrl+Enter (panel action), Ctrl+Arrow (tab switching).

Only single printable ASCII characters (input.length === 1 && input >= " " && input <= "~") are inserted as text - this prevents multi-char sequences like \r\n (VS Code Ctrl+Enter) from injecting newlines.

Forms

  • Create: WizardForm - one field per screen with breadcrumb progress. Ctrl+S skips optional fields. Esc goes back one step (or cancels from step 1). Uses FocusableInput for text steps and arrow-key select for suggestion steps.
  • Edit: PatchEditForm - read-only labeled table of all current values. The command input suggests change <field> commands. Selecting one activates that row's inline input. Pending changes shown with a indicator and count in the header. save commits, cancel discards.

Floating Elements

  • Toasts: position="absolute" bottom={0} right={0} - float over content in the bottom-right corner. Round border, elevated background, auto-dismiss after 3.5s. Max 4 visible.
  • Command dropdown: position="absolute" bottom={3} - floats above the input row without pushing layout. Selected row uses bg.active highlight.
  • Modals: position="absolute" centered overlays with borderStyle="round". Escape to close. CommandsBrowserModal is centered with search + grouped command list.
  • DebugPanel: Optional 22% right column (toggled via "debug" command). Shows last 12 keypresses with char codes and modifier flags. Warning-yellow border.

Key Hints

The hint bar at the bottom of the command input shows contextual shortcuts:

  • Left side: ······· esc cancel (dots as visual separator)
  • Right side: tab panels ctrl+p commands (command mode), enter confirm (confirm mode), enter apply (search mode)

Key hints use bold for the key label and muted for the action description.

Status Indicators

Loop status is communicated via color:

  • Running loops show a green ink-spinner (dots animation) inline in the list row
  • Status text in the list uses semantic colors (running=green, waiting=muted, paused=yellow, idle=orange, stopped=red)
  • Run history sparkline uses blue bars with success/danger streak indicators
  • Run exit codes use checkmark ( green) or cross ( red) icons

Constraints

  • No mouse - Ink has no mouse API. All interaction is keyboard.
  • No CSS animations - Terminal rendering. The only motion is ink-spinner.
  • Terminal-width dependent - Responsive breakpoints: wide (>=110 columns) uses side-by-side panels; compact (70-109) stacks full-width navigator and inspector panels; minimal (<70) shows only the full-width navigator.
  • Color compatibility - Uses 24-bit ANSI true color. Falls back gracefully on terminals without true color support via Ink's color handling.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.