Skip to content

fix: 完善 Agent Companion 完成气泡5s自动关闭#1246

Open
15088667764-lang wants to merge 3 commits into
GCWing:mainfrom
15088667764-lang:main
Open

fix: 完善 Agent Companion 完成气泡5s自动关闭#1246
15088667764-lang wants to merge 3 commits into
GCWing:mainfrom
15088667764-lang:main

Conversation

@15088667764-lang

Copy link
Copy Markdown

Summary

Fixes #

Type and Areas

Type:

Areas:

Motivation / Impact

Verification

Reviewer Notes

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@GCWing GCWing requested a review from bobleer June 17, 2026 09:44
@bobleer bobleer marked this pull request as draft June 17, 2026 11:07
bobleer

This comment was marked as outdated.

@bobleer bobleer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core auto-dismiss design is sound, but there are blocking issues before this can merge.

Blocking: unrelated binary rename

This PR is about completion-bubble auto-dismiss, but it also renames bitfun-desktop -> BitFun in:

  • src/apps/desktop/Cargo.toml ([[bin]] name)
  • scripts/dev.cjs (binaryName)

This renames the executable on all platforms while many paths still hardcode bitfun-desktop:

  • BitFun-Installer/src-tauri/src/installer/mod.rsMAIN_APP_EXE = "bitfun-desktop.exe" (used in 15+ call sites across commands.rs, registry.rs, shortcut.rs)
  • BitFun-Installer/scripts/build-installer.cjs — 5 hardcoded bitfun-desktop.exe references
  • tests/e2e/config/embedded-driver.ts:73 — binary name
  • tests/e2e/config/capabilities.ts:24,28appName
  • .github/workflows/desktop-package.yml:117 — exe validation path
  • src/crates/interfaces/acp/src/client/manager.rs:597 — ACP client identity string
  • src/apps/desktop/src/computer_use/desktop_host.rs — user-facing messages and comments

CI Rust Build Check only compiles and won't catch the E2E/installer/packaging breakage this causes on Windows/Linux.

Revert the binary rename from this PR. The Bitfun -> BitFun displayName branding fix is fine to keep.

Blocking: shouldMarkUnreadCompletion behavior change

Changing from conditional (sessionId !== activeSessionId || !isAppWindowFocused()) to always true has side effects:

  • Every completion triggers a persistence write (markSessionUnreadCompletion + onPersistUnreadCompletion), where previously completions on the active/focused session were skipped entirely.
  • Restored sessions with persisted unreadCompletion cannot be distinguished from new completions — they immediately schedule a 5s auto-dismiss timer on app start.

Add at least one focused test covering the new semantics.

Should fix: log verbosity

Multiple log.info("[AgentCompanion auto-dismiss] ...") calls in App.tsx. The project logging guidelines require English-only logs. These timer lifecycle logs should be log.debug, not log.info.

Missing tests

No coverage for:

  • Auto-dismiss timer scheduling/cancellation (checkAndSchedule)
  • Cross-window agent-companion://dismiss-completion events
  • The shouldMarkUnreadCompletion change

chenjingping added 2 commits June 18, 2026 15:06
…iss, add tests

- Revert bitfun-desktop → BitFun binary rename in Cargo.toml and dev.cjs
- Keep shouldMarkUnreadCompletion always true but skip auto-dismiss for
  active focused sessions (user sees completion directly in chat UI)
- Change AgentCompanion auto-dismiss logs from info to debug level
- Add shouldMarkUnreadCompletion to __test_only__ with 3 focused tests
…for 5s

The checkAndSchedule active-focused guard was clearing unreadCompletion
immediately, which prevented the Agent Companion pet from ever showing
completion bubbles for the active session. Reverted to always schedule
the 5 s auto-dismiss timer for every session.
@15088667764-lang

Copy link
Copy Markdown
Author

发送多条消息后,每完成一条后观察 partner 气泡,气泡显示“已完成”后 停留 5 秒自动消失,或是点击 Agent 伙伴立即消失。

@15088667764-lang 15088667764-lang marked this pull request as ready for review June 18, 2026 08:39
@15088667764-lang 15088667764-lang requested a review from bobleer June 22, 2026 01:14
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.

2 participants