Skip to content

🤖 feat: add global heartbeat default prompt#3114

Open
ibetitsmike wants to merge 1 commit intomainfrom
mike/heartbeat-9t9e
Open

🤖 feat: add global heartbeat default prompt#3114
ibetitsmike wants to merge 1 commit intomainfrom
mike/heartbeat-9t9e

Conversation

@ibetitsmike
Copy link
Copy Markdown
Contributor

@ibetitsmike ibetitsmike commented Apr 2, 2026

Summary

Adds a global heartbeatDefaultPrompt config field so users can define a default prompt for all workspace heartbeats. Per-workspace messages override it; the hardcoded fallback remains when neither is set.

Background

Heartbeats currently use a hardcoded default message body unless a per-workspace custom message is set. Users want to configure a single default prompt globally, rather than repeating the same custom message in every workspace.

Implementation

  • Added heartbeatDefaultPrompt to the app config schema (AppConfigOnDiskSchema) and ProjectsConfig type, persisted in ~/.mux/config.json.
  • Added config.updateHeartbeatDefaultPrompt IPC route (follows the updateLlmDebugLogs pattern) with trim and self-healing for empty/whitespace values.
  • Extended config.getConfig output to include heartbeatDefaultPrompt.
  • Updated WorkspaceService.buildHeartbeatSendOptions() so precedence is: per-workspace message > global heartbeatDefaultPrompt > hardcoded HEARTBEAT_DEFAULT_MESSAGE_BODY.
  • Added a textarea in Settings > General, gated behind the WORKSPACE_HEARTBEATS experiment, that loads from config and saves on blur.

Validation

  • IPC persistence test: saves/loads/clears heartbeatDefaultPrompt correctly.
  • Service precedence tests: workspace override wins, global default used when no workspace override, empty global falls back to hardcoded default.
  • Settings UI test: textarea only visible when experiment is enabled.

Mux working on behalf of Mike


Generated with mux • Model: anthropic:claude-opus-4-6 • Thinking: xhigh • Cost: $22.90

@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

@ibetitsmike ibetitsmike force-pushed the mike/heartbeat-9t9e branch from 2580acb to b6d00d3 Compare April 2, 2026 22:22
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike ibetitsmike closed this Apr 2, 2026
@ibetitsmike ibetitsmike force-pushed the mike/heartbeat-9t9e branch from b6d00d3 to f3a2722 Compare April 2, 2026 23:11
@ibetitsmike ibetitsmike changed the title 🤖 refactor: rename heartbeat message to defaultPrompt 🤖 feat: add global heartbeat default prompt Apr 2, 2026
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

@ibetitsmike ibetitsmike reopened this Apr 2, 2026
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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