Three bugs in the /sessions picker, all of them found by review and all of
them visible on the screen:
- sp_engine_sources() hard-set every foreign source's count to 0, so the
picker offered "claude (0)" while 82 rows were behind it. The count now
comes from the same listing the picker shows.
- sp_foreign_sessions() hard-set each row's date to 0, so every foreign
session drew as 1970-01-01. The plugin prints "%Y-%m-%d %H:%M" and the
row's first column is parsed into epoch seconds.
- The foreign plugin's list tool queried with its configured default
(limit = 25) no matter what the caller asked for, so asking for 100 rows
returned 25 and a store with 290 sessions looked like one with 25. The
caller's limit now reaches the SQL.
Proof: tests/test_foreignopen.c asserts count == 1 and mtime > 1600000000
against a fixture store; reverting either fix makes both checks fail. Live
over the socket, before: [('splinter', 100), ('claude', 0), ('opencode', 0)]
with mtime 0 on every row; after: [('splinter', 100), ('claude', 82),
('opencode', 100)] with mtime 1795387200. sqlite3 counts 290 opencode
sessions and 82 claude files, so the numbers agree with the stores.
make check: 21 suites, 0 failures. check_i18n: 229 keys in 3 catalogues.