-
Notifications
You must be signed in to change notification settings - Fork 244
fix: re-enable batch state debouncing to resolve Auto Run performance regression #465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
felipeggv
wants to merge
24
commits into
RunMaestro:main
from
felipeggv:fix/autorun-debounce-regression
Closed
Changes from 6 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4c9f951
fix: re-enable batch state debouncing to resolve Auto Run performance…
48b8de3
MAESTRO: port agent-inbox shared types from feature/inbox-focus-polish
efe7dfc
MAESTRO: add unifiedInbox flag to EncoreFeatureFlags
9268995
MAESTRO: add Unified Inbox toggle card in Settings Encore tab
e29b425
MAESTRO: port useAgentInbox hook and AgentInbox components from featu…
615ff25
MAESTRO: integrate Unified Inbox modal into App.tsx with Encore Featu…
7eff634
MAESTRO: register Option+I keyboard shortcut for Unified Inbox with E…
d6842b1
MAESTRO: add Unified Inbox menu item to hamburger menu in SessionList
4403705
MAESTRO: add Unified Inbox action to command palette (QuickActionsModal)
2a05348
MAESTRO: fix unused-var eslint warning in FocusModeView
cd0734c
MAESTRO: fix Focus Mode auto-scroll bug with proximity-based approach
cf06151
MAESTRO: fix CodeRabbit bugs — group header a11y, scoped collapse, se…
1b65706
MAESTRO: align Inbox + Focus Mode headers with Director's Notes tokens
c47fca2
MAESTRO: align Focus Mode content spacing + reply input with Director…
d9698cb
MAESTRO: mark test verification gate as passed — 3 pre-existing Codex…
26d100b
MAESTRO: mark final verification gate as passed — ESLint clean + all …
3c388c7
MAESTRO: remove redundant star icons from Inbox + Focus Mode
b9252ef
MAESTRO: add description field to AITab and tabDescription flag to En…
d4829ed
MAESTRO: add Tab Description Settings toggle and handleUpdateTabDescr…
3cf3ccd
MAESTRO: wire tab description handler through prop chain and build in…
ed2e54b
MAESTRO: constrain tab description to 3-line max with ellipsis overflow
f494fad
fix: enable fuzzy matching for session filter in Left Bar
ad846a8
fix: enable fuzzy matching for slash command autocomplete in input area
f779e9a
fix: update fuzzy autocomplete test, remove duplicate log entry, cons…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
playbooks/agent-inbox/2026-02-26-Encore-Inbox-Refactor/ENCORE-INBOX-02.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # ENCORE-INBOX-02: Add `unifiedInbox` flag to EncoreFeatureFlags | ||
|
|
||
| ## Objective | ||
| Register the Unified Inbox as an Encore Feature with a type flag and default value. | ||
|
|
||
| ## Context | ||
| - `EncoreFeatureFlags` interface is at `src/renderer/types/index.ts:906` — currently only has `directorNotes: boolean` | ||
| - `DEFAULT_ENCORE_FEATURES` is at `src/renderer/stores/settingsStore.ts:110` — currently `{ directorNotes: false }` | ||
| - The settings store hydration merges saved values with defaults at `settingsStore.ts:1669-1673` using spread: `{ ...DEFAULT_ENCORE_FEATURES, ...(saved) }` — so new fields with defaults are safe | ||
| - Both type AND default MUST be updated in the same task to avoid runtime `undefined` | ||
|
|
||
| ## Tasks | ||
|
|
||
| - [x] In `src/renderer/types/index.ts`, find the `EncoreFeatureFlags` interface at line 906. Add `unifiedInbox: boolean` below `directorNotes`. Also in `src/renderer/stores/settingsStore.ts`, find `DEFAULT_ENCORE_FEATURES` at line 110. Add `unifiedInbox: false` to the object. Both changes must happen together: | ||
| ```typescript | ||
| // types/index.ts:906 | ||
| export interface EncoreFeatureFlags { | ||
| directorNotes: boolean; | ||
| unifiedInbox: boolean; | ||
| } | ||
|
|
||
| // stores/settingsStore.ts:110 | ||
| export const DEFAULT_ENCORE_FEATURES: EncoreFeatureFlags = { | ||
| directorNotes: false, | ||
| unifiedInbox: false, | ||
| }; | ||
| ``` | ||
|
|
||
| - [x] Run `npm run lint` to verify the new field doesn't cause type errors. Existing code spreading `encoreFeatures` will pick up the new field automatically via the default merge at line 1669-1673. | ||
|
|
||
| ## Gate | ||
| - `npm run lint` passes | ||
| - `EncoreFeatureFlags` has both `directorNotes` and `unifiedInbox` fields | ||
| - `DEFAULT_ENCORE_FEATURES` has `unifiedInbox: false` |
46 changes: 46 additions & 0 deletions
46
playbooks/agent-inbox/2026-02-26-Encore-Inbox-Refactor/ENCORE-INBOX-04.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # ENCORE-INBOX-04: Port useAgentInbox hook and AgentInbox components | ||
|
|
||
| ## Objective | ||
| Port the data hook and all 3 component files from `feature/inbox-focus-polish` into the current codebase, adapting imports to the new architecture. | ||
|
|
||
| ## Context | ||
| - Source branch: `feature/inbox-focus-polish` | ||
| - Files to port: | ||
| - `src/renderer/hooks/useAgentInbox.ts` — data aggregation hook | ||
| - `src/renderer/components/AgentInbox/index.tsx` — modal shell + view switching | ||
| - `src/renderer/components/AgentInbox/InboxListView.tsx` — virtualized list view | ||
| - `src/renderer/components/AgentInbox/FocusModeView.tsx` — focus mode detail view | ||
| - The new codebase uses `settingsStore.ts` (Zustand) instead of prop-drilling settings | ||
| - `useModalLayer` hook and `MODAL_PRIORITIES` still exist in the same locations | ||
| - `modalStore` still exists at `src/renderer/stores/modalStore.ts` | ||
| - `formatRelativeTime` is at `src/renderer/utils/formatters.ts` | ||
|
|
||
| ## Tasks | ||
|
|
||
| - [x] Create `src/renderer/hooks/useAgentInbox.ts` by extracting from old branch: `git show feature/inbox-focus-polish:src/renderer/hooks/useAgentInbox.ts`. Copy the full content. Verify imports: `Session`, `Group` from `../types`, `InboxItem`, `InboxFilterMode`, `InboxSortMode` from `../types/agent-inbox`. These should resolve since Phase 01 created the types file. Run `npm run lint` to check. | ||
|
|
||
| - [x] Create the directory `src/renderer/components/AgentInbox/` and port all 3 component files. For each, extract from old branch and copy: | ||
| 1. `git show feature/inbox-focus-polish:src/renderer/components/AgentInbox/index.tsx` → `src/renderer/components/AgentInbox/index.tsx` | ||
| 2. `git show feature/inbox-focus-polish:src/renderer/components/AgentInbox/InboxListView.tsx` → `src/renderer/components/AgentInbox/InboxListView.tsx` | ||
| 3. `git show feature/inbox-focus-polish:src/renderer/components/AgentInbox/FocusModeView.tsx` → `src/renderer/components/AgentInbox/FocusModeView.tsx` | ||
| After copying, verify all imports resolve. Key imports to check: | ||
| - `../../types` should export `Theme`, `Session`, `Group`, `ThinkingMode`, `LogEntry` | ||
| - `../../types/agent-inbox` should export all inbox types (from Phase 01) | ||
| - `../../hooks/useAgentInbox` should resolve (created above) | ||
| - `../../hooks/ui/useModalLayer` — verify this exists: `ls src/renderer/hooks/ui/useModalLayer*` | ||
| - `../../constants/modalPriorities` — verify: `grep -n "AGENT_INBOX" src/renderer/constants/modalPriorities.ts`. If `AGENT_INBOX` doesn't exist in priorities, add it (use priority 555, same as old branch) | ||
| - `../../stores/modalStore` — verify `selectModalData` is exported | ||
| - `../../utils/formatters` — verify `formatRelativeTime` is exported | ||
| - The ported `InboxListView.tsx` uses `react-window` for virtualization, but this dependency does NOT exist in the project. The codebase already uses `@tanstack/react-virtual` (used by Director's Notes `UnifiedHistoryTab.tsx`). After copying the files, replace ALL `react-window` imports with `@tanstack/react-virtual` equivalents. Specifically: replace `import { FixedSizeList } from 'react-window'` (or similar) with `import { useVirtualizer } from '@tanstack/react-virtual'` and refactor the list rendering to use the `useVirtualizer` hook pattern (see `src/renderer/components/DirectorNotes/UnifiedHistoryTab.tsx` lines 201-221 for reference). This avoids adding an unnecessary dependency. | ||
| - `../../utils/markdownConfig` — verify `generateTerminalProseStyles` exists | ||
| - `../../components/MarkdownRenderer` — verify exists | ||
| **Notes:** react-window → @tanstack/react-virtual migration completed. Added `agentInbox` to ModalId type, AgentInboxModalData interface, ModalDataMap, and getModalActions() in modalStore.ts. AGENT_INBOX priority added at 555 in modalPriorities.ts. | ||
|
|
||
| - [x] Run `npm run lint` and fix any import resolution errors. Common issues: renamed types, moved hooks, missing re-exports. Fix each error by finding the new location of the imported symbol. | ||
| **Notes:** Fixed 2 type narrowing issues in index.tsx (filterMode/sortMode from ModalData needed explicit casts to InboxFilterMode/InboxSortMode). Lint passes clean. | ||
|
|
||
| ## Gate | ||
| - `src/renderer/hooks/useAgentInbox.ts` exists | ||
| - `src/renderer/components/AgentInbox/` directory has 3 files: `index.tsx`, `InboxListView.tsx`, `FocusModeView.tsx` | ||
| - `npm run lint` passes (zero errors) | ||
| - `AGENT_INBOX` priority registered in `modalPriorities.ts` |
61 changes: 61 additions & 0 deletions
61
playbooks/agent-inbox/2026-02-26-Encore-Inbox-Refactor/ENCORE-INBOX-05.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # ENCORE-INBOX-05: Integrate Unified Inbox into App.tsx (modal + state + Encore gating) | ||
|
|
||
| ## Objective | ||
| Wire the Unified Inbox modal into App.tsx with Encore Feature gating, following the Director's Notes pattern exactly. | ||
|
|
||
| ## Context | ||
| - App.tsx is at `src/renderer/App.tsx` (6,563 lines post-refactor) | ||
| - Director's Notes pattern to mirror: | ||
| - Line 46-47: lazy import `const DirectorNotesModal = lazy(() => import('./components/DirectorNotes')...)` | ||
| - Line 356-357: modal state from `useModalActions()` — `directorNotesOpen, setDirectorNotesOpen` | ||
| - Line 508: `encoreFeatures` destructured from settings | ||
| - Line 5220: conditional setter for SessionList: `setDirectorNotesOpen: encoreFeatures.directorNotes ? setDirectorNotesOpen : undefined` | ||
| - Line 5634: conditional handler for QuickActions: `encoreFeatures.directorNotes ? () => setDirectorNotesOpen(true) : undefined` | ||
| - Line 6017: gated modal render: `{encoreFeatures.directorNotes && directorNotesOpen && (<Suspense>...</Suspense>)}` | ||
| - `useModalActions()` comes from `src/renderer/stores/modalStore.ts` — need to add `agentInboxOpen`/`setAgentInboxOpen` there first | ||
| - `modalStore.ts` has `agentInbox` in valid modal IDs (check with `grep "agentInbox" src/renderer/stores/modalStore.ts`) — if not, add it | ||
|
|
||
| ## Tasks | ||
|
|
||
| - [x] In `src/renderer/stores/modalStore.ts`, verify that `agentInbox` is registered as a valid modal ID. Search for `type ModalId` or the array/union of valid modal IDs. If `agentInbox` is NOT present, add it following the pattern used by `directorNotes` or other modals. Also verify `useModalActions()` returns `agentInboxOpen` and `setAgentInboxOpen` — if not, add them following the `directorNotesOpen`/`setDirectorNotesOpen` pattern. | ||
| > `agentInbox` was already registered as ModalId (line 230) with `AgentInboxModalData` and `setAgentInboxOpen` action. Added `agentInboxOpen` reactive selector to `useModalActions()` return object. | ||
|
|
||
| - [x] In `src/renderer/App.tsx`, add the lazy import for AgentInbox near line 46 (next to Director's Notes import): | ||
| ```typescript | ||
| const AgentInbox = lazy(() => import('./components/AgentInbox')); | ||
| ``` | ||
| Then destructure `agentInboxOpen` and `setAgentInboxOpen` from `useModalActions()` (find where `directorNotesOpen` is destructured, around line 356). | ||
| > Added lazy import at line 49. Destructured `agentInboxOpen` and `setAgentInboxOpen` from `useModalActions()` at lines 360-361. | ||
|
|
||
| - [x] In `src/renderer/App.tsx`, add the gated modal render. Find the Director's Notes modal block (line 6017: `{encoreFeatures.directorNotes && directorNotesOpen && (`). AFTER that block, add: | ||
| ```tsx | ||
| {encoreFeatures.unifiedInbox && agentInboxOpen && ( | ||
| <Suspense fallback={null}> | ||
| <AgentInbox | ||
| theme={theme} | ||
| sessions={sessions} | ||
| groups={groups} | ||
| onClose={() => setAgentInboxOpen(false)} | ||
| onNavigateToSession={handleNavigateToSession} | ||
| /> | ||
| </Suspense> | ||
| )} | ||
| ``` | ||
| Verify `handleNavigateToSession` or equivalent callback exists (search for the function used by Director's Notes `onResumeSession`). If the exact callback doesn't exist, create a minimal one or use `handleDirectorNotesResumeSession` pattern as reference. | ||
| > Created `handleAgentInboxNavigateToSession` callback (closes inbox, switches to session). Gated modal render at line 6051 with full props including `enterToSendAI`. | ||
|
|
||
| - [x] Wire conditional setters for child components. Find the props assembly area (around line 5220 where Director's Notes does it): | ||
| - For SessionList: `setAgentInboxOpen: encoreFeatures.unifiedInbox ? setAgentInboxOpen : undefined` | ||
| - For QuickActionsModal (around line 5634): `onOpenUnifiedInbox: encoreFeatures.unifiedInbox ? () => setAgentInboxOpen(true) : undefined` | ||
| > Both wired. Also added `setAgentInboxOpen` to keyboard handler ref object for future keybinding support. | ||
|
|
||
| - [x] Run `npm run lint` — expect type errors for SessionList/QuickActionsModal props not accepting optional. Note errors for next phases. | ||
| > 2 expected type errors: | ||
| > 1. `TS2353`: `setAgentInboxOpen` not in `UseSessionListPropsDeps` type (line 5236) | ||
| > 2. `TS2322`: `onOpenUnifiedInbox` not in `AppModalsProps` type (line 5652) | ||
| > Both will be resolved in phases 06-08 when those component prop interfaces are updated. | ||
|
|
||
| ## Gate | ||
| - `npm run lint` may have type errors (resolved in phases 06-08) | ||
| - `grep -n "agentInboxOpen" src/renderer/App.tsx` returns lazy import, state, gated render, and conditional setters | ||
| - Modal is gated: `encoreFeatures.unifiedInbox && agentInboxOpen` |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 6922
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 8245
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 1234
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 4235
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 2517
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 3636
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 1051
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 1014
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 152
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 67
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 1977
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 869
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 1084
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 1202
🏁 Script executed:
Repository: RunMaestro/Maestro
Length of output: 429
Add
setAgentInboxOpentoUseSessionListPropsDepsandonOpenUnifiedInboxtoAppModalsProps.The code at lines 5239 and 5655–5657 passes these Unified Inbox props to dependent components, but the corresponding prop interfaces do not include them. This will cause TypeScript errors (TS2353/TS2322).
Add
setAgentInboxOpen?: (open: boolean) => void;toUseSessionListPropsDeps(following thesetDirectorNotesOpenpattern) andonOpenUnifiedInbox?: () => void;toAppModalsProps(following theonOpenDirectorNotespattern).🤖 Prompt for AI Agents