Skip to content

feat(app): merge local and remote message sources#1

Merged
ethfumi merged 5 commits into
mainfrom
feat/app-multi-db
Jul 14, 2026
Merged

feat(app): merge local and remote message sources#1
ethfumi merged 5 commits into
mainfrom
feat/app-multi-db

Conversation

@ethfumi

@ethfumi ethfumi commented Jul 14, 2026

Copy link
Copy Markdown
Owner

fork 側に取り込む。upstream には fujibee#389 として提案済みだが、方針に合わなければ閉じられる想定なので、こちらの main では使える状態にしておく。

CI をここで通しておく意味もある。upstream の PR は fork からの初回コントリビューターのため action_required で承認待ちになり、fujibee さんが見るまでチェックが走らない。bats / macOS / Windows のレグはローカルでは回せていないので、ここで確認する。

内容は fujibee#389 と同じ:

  • Team Room がローカル DB と SSH 経由の read-only な remote DB を1つの表示に統合
  • source は ~/.agmsg/config/app-sources.json で宣言、api.sh 経由で取得
  • 履歴ページングと live カーソルは source ごとに独立、source 修飾 id で重複排除して時系列マージ
  • remote は読み取り専用(spawn / rename / leave / 送信はローカル限定)
  • --after-id 未対応の古い core には最新100件 fallback

実機の Windows + Mac 2台構成で確認済み。

ethfumi added 4 commits July 14, 2026 13:21
Add --after-id to the team messages endpoint so polling clients can fetch rows strictly after a cursor. Forward pages select the oldest matching rows before emitting them in ascending order, preventing gaps when more than the requested limit arrives between polls; backward history keeps its existing newest-page behavior.

Reject simultaneous before/after cursors and cover both cursor exclusivity and multi-page forward ordering in the API tests.
Allow Team Room to combine the implicit local agmsg installation with read-only installations reached over SSH. Sources are configured in ~/.agmsg/config/app-sources.json and queried through the public api.sh interface with the system SSH client; the app never mounts, copies, or synchronizes messages.db and does not store credentials.

Keep history pages and live cursors independent per source, deduplicate messages with source-qualified ids, and merge them in stable timestamp order. Modern remotes use lossless --after-id polling while older cores fall back to refreshing their latest 100 messages.

Show source badges and remote members for filtering while keeping spawn, rename, leave, and compose operations local-only. Add source validation, Rust and frontend coverage, and configuration documentation.
Resolve the sidebar member list, where fujibee#385 (agent and team status) and
multi-source support both rewrote the same block. Everything else merges
cleanly.

Take the pane status dot from fujibee#385 and drop the running dot it replaced.
Keep the source-qualified key, since two sources can carry members with
the same name. Keep the read-only guards for members that come from a
remote source: no spawn, no context menu, source label in the title.
Read-only members have no local pane, so their status is null and the
check slot renders empty.
A read-only member from a remote source showed the status dot of a local
pane when both carried the same name.

Reproduce by joining claude-win on both a Windows and a Mac installation,
then spawning the Windows one: the Mac claude-win shows a running dot
although nothing runs on the Mac.

Panes are local-only, and member names are unique per source rather than
globally, so matching a pane on the name alone breaks as soon as two
sources carry the same name. Exclude read-only members before the lookup.

Both fujibee#385 and the multi-source work matched panes by name, so the gap
predates this branch and only surfaced once the two met. The 91 frontend
tests stayed green throughout; it took spawning an agent against a real
two-source setup to see it.
@ethfumi ethfumi changed the title [リハ] CI 確認用 — マージしない feat(app): merge local and remote message sources Jul 14, 2026
The multi-source work reformatted the tests module's import list to add
message_sources, shell_quote, and valid_source_id, and dropped run_script
while doing so.

The four tests that call it are gated on #[cfg(not(target_os = "windows"))],
so on Windows they are compiled out and the missing import never surfaces —
cargo test stays green. macOS compiles them and fails with E0425.

Found by running the suite on a fork PR before proposing this upstream;
the Windows-only local runs could not have caught it.
@ethfumi ethfumi merged commit b42840b into main Jul 14, 2026
7 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