Repository navigation
Releases: CuriousTank/opencode-led
Release list
v0.8.0 — Close Terminal + XShape & Title Fixes
New Features
🗑 Close Terminal
Right-click a specific bulb → Close Terminal to gracefully shut down that opencode terminal (EWMH _NET_CLOSE_WINDOW, equivalent to clicking the terminal's ✕ button).
- Two-step confirmation prevents accidental closes
- Graceful shutdown: shell exits → opencode receives SIGHUP → plugin dispose fires → bulb disappears automatically
- Terminal's own protection (e.g. "process running" prompt) still applies
Bug Fixes
XShape click-through dead zone
A stale egui AreaState rect from the right-click menu was permanently added to the XShape input region after the menu was first opened and closed, creating an invisible dead zone that blocked clicks in the transparent tooltip area above the bulbs. (926870c)
Bulb title not updating on session switch
When opencode switched sessions (/resume or new conversation), the bulb tooltip kept showing the old session's title. The plugin now falls back to the most recently active session instead of Map iteration order. (2ac1eac)
Install
sudo dpkg -i opencode-traffic-light_0.8.0_amd64.debv0.7.0 — Dual-View Session Picker + Startup Focus Return
What's New
✨ Dual-View Session Picker: Recent / Project
The "Open from Session" panel now has a segmented control toggle at the top:
- ⏱ Recent — flat list sorted by time (existing behaviour, refined)
- 📁 Project — sessions grouped by project directory in a collapsible accordion
By Project View
- Sessions clustered by
directoryfield, ranked by most recent activity (max(time_updated)) - Top 5 project paths shown as collapsible groups; remaining sessions merged into a single 📦 Other group
- Each group header shows: chevron ▼/▶ + 📁 basename + active status dot +
N sessions · time - Top 1 group auto-expanded on open; click any header to toggle
- Session cards inside groups are simplified (title + time only — path is in the header)
- Other group cards include the project basename since paths differ
- View mode preference persisted to
settings.json
Bug Fixes in Session Panel
- Chevron rendering: drawn as painted triangle via
egui::Shape::convex_polygoninstead of Unicode glyph (avoids tofu/missing-glyph boxes) - Missing sessions: DB query limit raised from 10 → 50 for better clustering coverage (Recent view still displays top 20)
- Empty titles: now show "Untitled session" instead of blank card rows
✨ Startup Focus Return
When the widget launches, the window manager (Mutter/GNOME Shell) steals keyboard focus and assigns it to the widget window. This is now fixed:
- Before the widget window is mapped, the currently active window is captured via
_NET_ACTIVE_WINDOWX11 property - For 500ms after launch, each frame checks if focus has been stolen to the widget
- Once detected, focus is immediately restored to the previous window via
XSetInputFocus+_NET_ACTIVE_WINDOWClientMessage
Your terminal/editor keeps focus — the widget stays visually present but never interrupts your typing.
📦 Install
dpkg -i opencode-traffic-light_0.7.0_amd64.debRequires: libx11-6, libxcb1, libxi6, libxext6, libxdo3, libgtk-3-0, libappindicator3-1
v0.6.0 — Open from Session: Browse & Resume Past Conversations
What's New
✨ New Feature: Open from Session
Right-click any bulb → 📂 Open from Session to browse your recent opencode conversations.
- Reads recent sessions directly from opencode's local SQLite database (
~/.local/share/opencode/opencode.db) - Shows up to 10 most recent sessions with:
- Color dot indicating active/dormant status (colored by current light state)
- Project folder name (basename)
- Session title
- Full project path (shortened)
- Relative time ("2 min ago", "1 hour ago", etc.)
- Click any session to instantly resume it: opens a new terminal,
cdto the project directory, and runsopencode -s <session_id>to restore the full conversation history - Async loading — panel appears instantly, sessions populate when the DB query completes
🐛 Bug Fixes
Session panel no longer overlaps bottom bulbs
- Panel content is now constrained to
panel_rect(window height minus bulb area) - Previously the Frame extended across the entire window, causing the bottom cards to be obscured by the bulb row
Card hover & click fixed
- Hover highlight: removed
painter.rect_filled()overlay that covered card text → now uses Framefillcolor driven by per-card hover state tracking - Click detection:
egui::Frame::show().responsehas no click sensing → added explicitui.interact(rect, id, Sense::click())
🔧 Technical Details
- New dependency:
rusqlite = "0.31"withbundledfeature (compiles SQLite C source, WAL-safe read-only access) - New module:
src/sessions.rs—SessionInfostruct,load_recent_sessions(),relative_time(),shorten_path(),dir_basename() spawn_opencode_terminal(directory, session_id)now accepts an optional session ID foropencode -sresume- Panel rendered via
ui.new_child(UiBuilder::max_rect(panel_rect))to stay within bounds
📦 Install
dpkg -i opencode-traffic-light_0.6.0_amd64.debRequires: libx11-6, libxcb1, libxi6, libxext6, libxdo3, libgtk-3-0, libappindicator3-1