Skip to content

v0.7.12

Choose a tag to compare

@github-actions github-actions released this 19 May 10:33
· 2056 commits to main since this release
2f2a055

slk v0.7.12

A blazingly fast Slack TUI. Keyboard-driven, beautifully themed, under 20MB.

This release rewrites how slk tracks per-channel read state and fixes two long-standing sync defects against the official Slack client.

Fixed

  • Channels read elsewhere now reconcile in slk. Previously, if you read a channel in the official Slack client (phone, desktop) while slk was disconnected — even briefly — the channel could stay unread in slk's sidebar forever. The reconnect catch-up now pulls the full read state from Slack and writes it locally, including for channels that just transitioned to read.

  • Channels marked unread elsewhere now appear unread in slk. When you marked a message unread on your phone or another client, slk silently ignored the event and never showed the dot. Slack's channel_marked event is used in both directions (read AND mark-unread) and slk was unconditionally treating it as "read"; it now respects the unread count carried in the event.

  • UpsertChannel no longer clobbers read state. A channel re-upsert (e.g. on bootstrap or workspace switch) was wiping the persisted last_read_ts and unread count, then immediately restoring them only for channels that client.counts returned — leaving everything else permanently zeroed. The conflict clause no longer touches read-state columns.

Added

  • Wake-from-sleep detection. A short laptop sleep (under ~60s) used to leave slk's WebSocket connection alive at the OS level, which meant no reconnect, no catch-up, and stale unread dots until the next event randomly happened to fire. slk now watches wall-clock time and forces a per-workspace catch-up whenever it observes a jump consistent with the system having been suspended. Cross-platform via clock observation only — no system-level dependencies.

Changed

  • Sidebar section counts now count channels-with-unreads. The number next to "DMs" or "Channels" in the sidebar used to sum per-channel unread message counts (e.g. "DMs (47)"). It now counts how many channels in the section have any unreads (e.g. "DMs (3)"). The per-channel count was unreliable across channel types — Slack's API returns it inconsistently — and the channel-count is what most users actually want to glance at anyway.

Under the hood

For anyone curious about the architecture: read state is now stored only in SQLite. The in-memory mirrors (WorkspaceContext.LastReadMap, sidebar.ChannelItem.UnreadCount/LastReadTS, cache.Channel.UnreadCount/LastReadTS) are deleted. All six write paths (bootstrap, reconnect catch-up, *_marked events, new-message events, local mark-read, local mark-unread) funnel through a single mutation API. The sidebar and workspace rail read from SQLite at render time. The type system now prevents future divergence — there's no in-memory field to drift from the source of truth.

Database migration is automatic: a new has_unread boolean column is added on first launch. The deprecated unread_count SQLite column is retained for one release and dropped in v0.7.13.

Upgrade notes

Read state for every channel is re-fetched on first launch after upgrade. Expect a sub-second window with no unread dots between when slk opens and when the initial reconciliation completes.


Install

  • Linux/macOS: download the appropriate .tar.gz, extract, and place slk in your $PATH
  • Debian/Ubuntu: sudo dpkg -i slk_*.deb
  • Fedora/RHEL: sudo rpm -i slk_*.rpm
  • Alpine: sudo apk add --allow-untrusted slk_*.apk
  • Windows: download the .zip, extract slk.exe, add to PATH
  • Go: go install github.com/gammons/slk/cmd/slk@v0.7.12
  • Homebrew: brew install gammons/tap/slk

Verify downloads with checksums.txt.