Skip to content

Add Pulse for Rex, a watchlist pane beside your agents - #25

Merged
fatwang2 merged 2 commits into
mainfrom
rex-edition
Nov 12, 2026
Merged

fatwang2 merged 2 commits into
mainfrom
rex-edition

Conversation

@fatwang2

@fatwang2 fatwang2 commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

What

Pulse for Rex (rex/), a new MIT edition for Rex. Rex config can't draw UI, so Pulse is a terminal program in a pane, plus a Lua file Rex's init.lua loads.

  • Pane: opened beside the focused pane, about 48 columns wide. Each ticker shows its price and change. The selected ticker's day fills the space below the list: its chart, open, high, low, previous close and source.
  • Detail layer: Enter, or a second click on a row, opens the day in a Rex floating layer (session.new_layer). Esc closes it.
  • Band: a pane six rows tall or less draws one line of quotes. Rex's shortest pane is five rows.
  • Palette: lua/pulse.lua adds Pulse: Open Watchlist, Add Ticker…, Refresh Quotes and Pause or Resume. No keys are bound by default.
  • Keys in the pane: ↑↓ / j k / wheel, Enter, a add, x remove, r refresh, p pause, q quit.
  • Shell commands: pulse-rex add|remove|pause|resume|refresh|list. Open panes pick up changes within a second.
  • Storage: the watchlist is ~/.config/pulse-rex/watchlist.json, shared by every pane and command.
  • Shared code: quotes.js and watchlist.js are copies of the Herdr mod's. Only the header and PULSE_URLS (utm_source=rex&utm_medium=plugin) differ, and a test checks it.
  • Hosts and programs: the only hosts are Yahoo Finance and Binance Spot. The only program run is rex. Pulse for Mac links are OSC 8 hyperlinks.
  • Install: pulse-rex install adds one marked block to the end of Rex's init.lua. It runs rex config check and puts the file back if the check fails. It writes node and the package through a version manager's stable link (…/node/current/…), so upgrading node doesn't break the config. pulse-rex uninstall removes the block.
  • Width: Rex evens out a new split after it shows it, so pulse_open passes --beside/--ratio and the pane calls session.resize_pane itself once it starts.

Naming follows the other editions: npm rex-pulse-ticker (like opencode-pulse-ticker), User-Agent Pulse-Rex/<version>, release tags rex-v<version>.

Repo

  • Root README, AGENTS.md and CONTRIBUTING list the seventh edition.
  • The Makefile gains test-rex, and CI runs it.
  • .github/workflows/release-rex.yml publishes to npm from a rex-v* tag, as opencode's does.

Checks

  • make test-rex passes, 14 tests:
    • the shared files match Herdr's
    • every line fits its pane at many sizes, colored or not
    • the chart and its headroom
    • the band, and wide characters
    • keys and clicks
    • the shared watchlist file
    • the init.lua block (add, replace, remove) and stable node paths
  • make test-herdr test-opencode test-metrix still pass.
  • git diff --check reports no problems.
  • rex config check on an init.lua that loads rex/lua/pulse.lua reports 4 actions.
  • In a real Rex (Rex Beta 0.1.0, build 1925), using rex do <file> --action … with live quotes:
    • Open Watchlist sized the pane to 46 columns.
    • Enter and Esc open and close the layer, and a click selects then opens.
    • Add Ticker… adds a ticker, and a rejected ticker shows its wrapped error.
    • Pause, Refresh while paused, and Resume work.
    • A five-row pane shows the band.
  • npm pack, then a global install from the tarball: install is idempotent, and uninstall restores init.lua byte for byte.
  • Light theme: checked by the owner in Rex. The pane picks Pulse's blue and the selection color from the background, read with OSC 11.
  • Installed from the packed tarball with npm install --global and pulse-rex install. It wrote ~/.config/rex/init.lua through …/node/current/…. rex actions lists the four Pulse actions, and rex do pulse_open opened the pane from the installed config.
  • rex/preview.png is a screenshot of the real pane in Rex. It is in both READMEs and in the npm package.
  • Before the first rex-v0.1.0 tag: set up npm trusted publishing for rex-pulse-ticker (repository fatwang2/Pulse, workflow release-rex.yml, environment npm).

🤖 Generated with Claude Code

王顶 and others added 2 commits November 12, 2026 23:30
A Node CLI (rex-pulse-ticker, bin pulse-rex) that draws the watchlist in a
Rex pane, and lua/pulse.lua, which Rex's init.lua loads to add four
palette actions. quotes.js and watchlist.js are the Herdr mod's, checked
by a test. Release from a rex-v* tag through npm trusted publishing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fatwang2
fatwang2 merged commit 17ce949 into main Nov 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant