Add Grok orchestration group routing (#8058)

* docs: design Grok orchestration group

* docs: plan Grok orchestration group implementation

* fix: add Grok orchestration group

* test(orchestration): accept Windows skill newlines

* Fix @grok orchestration group matching and remove stale planning docs

- Reuse the shared buildAgentNameRe matcher in groups.ts instead of a
  divergent local regex, so orchestration groups honor the same
  Windows launcher-suffix rule (grok.exe/.cmd/.bat/.ps1) as the rest
  of Orca's agent-title detection.
- Add test coverage for real Grok OSC title shapes (spinner-collapsed,
  session titles) and Windows launcher-suffix titles.
- Delete the now-completed design and implementation-plan docs for
  the Grok orchestration group work.

---------

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
This commit is contained in:
BingZ
2026-07-11 21:43:20 -07:00
committed by GitHub
co-authored by Jinjing
parent 92ea918b63
commit be258e23ec
17 changed files with 109 additions and 63 deletions
@@ -53,9 +53,9 @@ describe('project-picker-browse-cache', () => {
0
)
for (let wave = 0; wave < 4; wave += 1) {
expect(
getProjectPickerBrowseCacheEntry('runtime:retained', inserted)
).toMatchObject({ projects: [expect.objectContaining({ owner: 'retained' })] })
expect(getProjectPickerBrowseCacheEntry('runtime:retained', inserted)).toMatchObject({
projects: [expect.objectContaining({ owner: 'retained' })]
})
for (let index = 1; index < PROJECT_PICKER_BROWSE_CACHE_MAX_ENTRIES; index += 1) {
const scope = `scope-${inserted}`
rememberProjectPickerBrowseCacheEntry(
@@ -26,8 +26,7 @@ const { appState, cacheMocks } = vi.hoisted(() => ({
}))
vi.mock('../../store', () => ({
useAppStore: (selector: (state: typeof appState.current) => unknown) =>
selector(appState.current)
useAppStore: (selector: (state: typeof appState.current) => unknown) => selector(appState.current)
}))
vi.mock('./pet-blob-cache', () => ({
@@ -137,15 +137,12 @@ export function useLinearAgentSkillSetupReminderToast({
}
}, [localDismissStorageKey, missingSetup])
useEffect(
() => {
if (surface !== 'modal') {
return
}
return () => {
dismissLinearAgentSkillSetupReminderToast(localDismissStorageKey)
}
},
[localDismissStorageKey, surface]
)
useEffect(() => {
if (surface !== 'modal') {
return
}
return () => {
dismissLinearAgentSkillSetupReminderToast(localDismissStorageKey)
}
}, [localDismissStorageKey, surface])
}
@@ -24,9 +24,9 @@ describe('linear agent skill setup reminders', () => {
MAX_LINEAR_AGENT_SKILL_SETUP_REMINDER_RUNTIME_KEYS
)
expect(hasLinearAgentSkillSetupReminderStateForTests('runtime-0')).toBe(false)
expect(hasLinearAgentSkillSetupReminderStateForTests(`runtime-${churnedRuntimeCount - 1}`)).toBe(
true
)
expect(
hasLinearAgentSkillSetupReminderStateForTests(`runtime-${churnedRuntimeCount - 1}`)
).toBe(true)
})
it('retains recently reused keys while trimming', () => {
@@ -228,9 +228,9 @@ describe('openMobileEmulatorTab', () => {
)
expect(ensureSimulatorTab).toHaveBeenCalledTimes(2)
const attachCalls = vi.mocked(callRuntimeRpc).mock.calls.filter(([, method]) =>
method === 'emulator.attach'
)
const attachCalls = vi
.mocked(callRuntimeRpc)
.mock.calls.filter(([, method]) => method === 'emulator.attach')
expect(attachCalls).toHaveLength(1)
expect(isManualSimulatorLaunchPending('wt-1')).toBe(false)
})
@@ -245,10 +245,12 @@ describe('openMobileEmulatorTab', () => {
)
vi.mocked(ensureSimulatorTab)
.mockImplementationOnce(() => {
mockStoreState.unifiedTabsByWorktree['wt-1'] = [{
id: 'sim-1',
contentType: 'simulator'
}]
mockStoreState.unifiedTabsByWorktree['wt-1'] = [
{
id: 'sim-1',
contentType: 'simulator'
}
]
return 'sim-1'
})
.mockImplementationOnce(() => {
@@ -54,11 +54,7 @@ export function beginHugeRepoWarningProbe(
export function hasDismissedHugeRepoWarning(probe: HugeRepoWarningProbe): boolean {
const state = hugeRepoWarningStateByWorktreeId.get(probe.worktreeId)
if (
!state ||
state.lifecycleToken !== probe.lifecycleToken ||
!state.dismissed
) {
if (!state || state.lifecycleToken !== probe.lifecycleToken || !state.dismissed) {
return false
}
refreshHugeRepoWarningState(probe.worktreeId, state)