Skip to content

feat: enable /ultraplan and harden GrowthBook fallback chain#156

Merged
claude-code-best merged 2 commits intoclaude-code-best:mainfrom
amDosion:feat/ultraplan-enablement
Apr 6, 2026
Merged

feat: enable /ultraplan and harden GrowthBook fallback chain#156
claude-code-best merged 2 commits intoclaude-code-best:mainfrom
amDosion:feat/ultraplan-enablement

Conversation

@amDosion
Copy link
Copy Markdown
Collaborator

@amDosion amDosion commented Apr 6, 2026

Summary

  • Enable /ultraplan: Add ULTRAPLAN build flag, move command out of INTERNAL_ONLY_COMMANDS, remove ant-only gate, decompile UltraplanChoiceDialog and UltraplanLaunchDialog from official CLI 2.1.92
  • Harden GrowthBook fallback: Ensure LOCAL_GATE_DEFAULTS are consulted even when global config is not yet initialized (early startup)
  • Improve Away Summary: Add idle-based detection for terminals without DECSET 1004 focus events (CMD, PowerShell)
  • Add cron management skills: Register /cron-list and /cron-delete bundled skills
  • Fix fullscreen gate: Restrict isFullscreenEnvEnabled() to ant-only

Changed files (13)

File Change
build.ts +ULTRAPLAN build flag
scripts/dev.ts +ULTRAPLAN dev flag
src/commands.ts Move ultraplan to public commands
src/commands/ultraplan.tsx isEnabled() => true
src/components/ultraplan/UltraplanChoiceDialog.tsx New — decompiled from 2.1.92
src/components/ultraplan/UltraplanLaunchDialog.tsx New — decompiled from 2.1.92
src/hooks/useAwaySummary.ts Idle-based away detection for Windows
src/screens/REPL.tsx Add 3 missing imports
src/services/analytics/growthbook.ts Fallback chain hardening
src/skills/bundled/cronManage.ts New — cron list/delete skills
src/skills/bundled/index.ts Register cron skills
src/utils/fullscreen.ts Gate to ant-only
DEV-LOG.md Development log update

Test plan

  • bun run build passes (480 files)
  • bun run lint passes (only pre-existing biome-ignore warnings)
  • /ultraplan command visible and launchable
  • Remote CCR session created and plan returned via UltraplanChoiceDialog
  • /cron-list and /cron-delete with active KAIROS cron jobs
  • Away summary triggers on Windows CMD/PowerShell after 5min idle

unraid added 2 commits April 6, 2026 17:16
Ultraplan:
- Add ULTRAPLAN to default build and dev feature flags
- Move ultraplan from INTERNAL_ONLY_COMMANDS to public COMMANDS list
- Remove USER_TYPE === 'ant' gate on ultraplan.isEnabled
- Decompile UltraplanChoiceDialog and UltraplanLaunchDialog from
  official CLI 2.1.92 into src/components/ultraplan/
- Add missing imports in REPL.tsx

GrowthBook:
- Harden fallback chain so LOCAL_GATE_DEFAULTS are consulted even
  when global config is not yet initialized (early startup)

Also:
- Add idle-based away summary for terminals without focus events
- Register cron list/delete skills
- Gate fullscreen to ant-only
@amDosion
Copy link
Copy Markdown
Collaborator Author

amDosion commented Apr 6, 2026

image image

@claude-code-best claude-code-best merged commit 33949ce into claude-code-best:main Apr 6, 2026
2 checks passed
@sobird
Copy link
Copy Markdown
Contributor

sobird commented Apr 9, 2026

hello

/**
* Attempt to persist the current transcript before clearing.
* Returns true on success, false on failure (non-fatal).
*/
async function trySaveTranscript(): Promise<boolean> {
try {
// In the official CLI this shares/persists the transcript file.
// Our codebase stubs analytics, so this is a best-effort no-op.
return true;
} catch {
return false;
}
}

我看了下源码,此处代码的实现是这样的:

import { stat, writeFile } from 'fs/promises'
import { getTranscriptPath } from 'src/utils/sessionStorage.js'
...

const transcriptSaved = await stat(getTranscriptPath()).then(() => true, () => false)

这里的逻辑可以完善下

另外

import { createCommandInputMessage } from '../../utils/messages.js';

这个 createCommandInputMessage 是不是应该使用 createSystemMessage 这个方法?

if (transcriptSaved) {
    setMessages(prev => [
    ...prev,
    createSystemMessage(`Previous session saved · resume with: claude --resume ${previousSessionId}`, 'suggestion'),
  ])
}

@amDosion
Copy link
Copy Markdown
Collaborator Author

amDosion commented Apr 9, 2026

你好

/**
* Attempt to persist the current transcript before clearing.
* Returns true on success, false on failure (non-fatal).
*/
async function trySaveTranscript(): Promise<boolean> {
try {
// In the official CLI this shares/persists the transcript file.
// Our codebase stubs analytics, so this is a best-effort no-op.
return true;
} catch {
return false;
}
}

我查看了下源码,这里代码的实现是这样的:

import { stat, writeFile } from 'fs/promises'
import { getTranscriptPath } from 'src/utils/sessionStorage.js'
...

const transcriptSaved = await stat(getTranscriptPath()).then(() => true, () => false)

这里的逻辑可以完善下

另外

import { createCommandInputMessage } from '../../utils/messages.js';

createCommandInputMessage是不是应该使用createSystemMessage这个方法?

if (transcriptSaved) {
    setMessages(prev => [
    ...prev,
    createSystemMessage(`Previous session saved · resume with: claude --resume ${previousSessionId}`, 'suggestion'),
  ])
}

你可以提交PR,按照你的需求来,我这边是逆向的2.1.92出来的,有更完善的建议都是可以自己提PR的(目前我这边在研究cli的群控,所以之前的暂时没有事件优化测试),还得麻烦大佬自己提PR了

同时Ultraplan内部依赖了bridge,同时bridge也影响了remoteControl,和remoteControlServer,在加上后面肯定会继续优化,支持微信,企业微信,等等来远程,目前还没有解决的思路,怎么在远程中也能利用,并且返回Ultraplan最后的选择项.

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.

3 participants