Repository navigation
perf(gui): share gRPC channel, batch polls, sync names, fix Win tests & build-gui - #44
Merged
Merged
Conversation
… & build-gui - gRPC channel: cache single HTTP/2 connection (OnceCell + health check) instead of per-call TCP connect/teardown; pin channel driver on a process-lifetime runtime so it survives throwaway startup threads (fixes "Service was not ready: transport error" at startup). - useAsyncResource: silent reload on poll ticks, skip re-render when data unchanged (optional isEqual comparator). - Thread store: shallow-compare guards on streaming + run status setStates; replace N x listRuns fan-out with single batch list_latest_run_infos. - Fix 3 Windows test failures: NUL excludesFile in shadow review, platform-aware path asserts in preview-link & markdown-refs tests. - Converge GUI DB title toward the agent session_name (TUI /name never wrote the GUI DB, causing "name reverts after restart"): sync_thread_title (no updated_at bump), on-poll sync in get_thread_agent_state, and startup-import sync. - Makefile: build-gui now produces standalone futureos.exe (build-gui-dist preserves the old frontend-only pass for check-gui), gui-sidecars target deduplicates binary copy in install-gui.
…ename Follow-up to the previous commit's review findings: - useAsyncResource: depsChanged was computed via useMemo keyed on `deps`, which only recomputes when deps change — so it could never observe an unchanged-deps poll tick and stayed `true` forever, flipping `loading` on every 1.5s approvals poll. Compute it on every render against the deps snapshotted by the last effect run; poll ticks are now truly silent (no setLoading, no re-render when isEqual also dedups data). - Down-agent tolerance: with the shared lazy channel, connect_agent succeeds even when the agent dies afterwards, so transport failures surfaced as plain string errors and the AgentUnavailable matchers stopped firing. New map_rpc_error() classifies tonic Unavailable as AgentUnavailable; applied to abort_agent_thread (local run cancel works again when the agent is down) and reload_agent_credentials (restores "down agent is success"). - rename_thread is now all-or-nothing: propagate to the agent FIRST and only persist the DB rename on success. A local-only rename would be silently reverted by the new title sync once the agent came back. "session not found" stays a benign case (no agent session → nothing can sync a stale name back). - tokio: explicitly enable rt-multi-thread (used by the pinned channel runtime; previously only enabled transitively via tauri). - Fix 2 ESLint errors + 1 jsdoc warning introduced by the previous commit (comma-dangle, arrow-parens, no-multi-asterisks) that broke `make lint-gui` / `check-gui`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
instead of per-call TCP connect/teardown; pin channel driver on a
process-lifetime runtime so it survives throwaway startup threads
(fixes "Service was not ready: transport error" at startup).
data unchanged (optional isEqual comparator).
setStates; replace N x listRuns fan-out with single batch
list_latest_run_infos.
platform-aware path asserts in preview-link & markdown-refs tests.
never wrote the GUI DB, causing "name reverts after restart"):
sync_thread_title (no updated_at bump), on-poll sync in
get_thread_agent_state, and startup-import sync.
(build-gui-dist preserves the old frontend-only pass for check-gui),
gui-sidecars target deduplicates binary copy in install-gui.