Skip to content

Fix scheduled approvals and tabbed question composers - #369

Merged
sambitcreate merged 6 commits into
mainfrom
t3code/fix-scheduled-task-approval
Oct 9, 2026
Merged

sambitcreate merged 6 commits into
mainfrom
t3code/fix-scheduled-task-approval

Conversation

@sambitcreate

@sambitcreate sambitcreate commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Approving a scheduled task could fail before saving because approval metadata made the tool arguments invalid for Pi’s JSON digest. Keep that metadata outside model arguments while preserving the approved model, workspace and exact connector scope.

Pending questions now replace the composer on desktop, iOS and Android, with one question per numbered tab and retained answers. Desktop also restores questions from phone-started runs and resolves them through their original owner. Schedule suggestions open editable chat requests, and approval previews disclose the actual task and scheduling state.

Validation:

  • Scheduled/automation suites: 158 / 182 passed; question suite: 21 passed; focused remote/IPC/adapter/render suite: 95 passed.
  • iOS simulator: 274 focused tests passed, including pending-question Stop and one-shot dictation regressions. Android: 93 unit and 10 rendered tests passed; lint passed.
  • Root/e2e TypeScript, ESLint, production build and diff checks passed.
  • All three focused Electron conversational scheduling/question scenarios passed. The final small-window test also verifies visible Submit controls and no sidebar overlap.

Known local test failure: assistant-scheduled-profile.spec.ts → local Aiden Live, Scheduled, Profile, and About surfaces stay safe to explore completes its assertions but exceeds the 35-second Electron shutdown bound. One follow-up run still failed teardown; the earlier question/approval/save teardown failure passed that follow-up. No timeout/retry/flaky-test enforcement was weakened. Local logs: /tmp/aiden-task-e2e3.log, /tmp/aiden-task-e2e-final.log; the final hosted scheduling/question shard passed all 49 tests, including this exploration scenario.

Audit and reference comparison: scheduled-task-question-audit-2026-10-06.md. No mobile wire revision, new permissions, saved-task rewrites, live task execution, or release.

Review follow-up preserves the iOS Stop action during questions, consumes dictation launch intent at chat lifetime, and strengthens the host-routing test.

Hosted flaky-test evidence: Electron E2E (2/3), initial head reported question tabs preserve answers and replace the composer in a short desktop window with card x=257 versus sidebar right=272; its configured runner retry passed. A local trace identified EnvironmentWorkbench.scrollLeft=88: hidden overflow allowed focus to pan the entire chat. Its outer boundary now uses non-scrollable clipping, custom-answer focus prevents ancestor scrolling, and the same geometric invariant waits for settled layout. The Linux x64 gate reported the same test failure. No extra job rerun was requested and no timeout/retry policy was relaxed. The corrected test passes on final head e246addf on both macOS and Linux.

The follow-up run caught a stale source-text assertion in the iOS shipping inventory. Replaced it with a read-only microphone-start assertion in the existing XCTest; the full iOS release-policy suite and focused dictation/read-only simulator tests pass. Both review bots cleared the production fixes.

Final validation on e246addf6696d36ebe5fbde9e101b7d3adeb6cbc: CI run passed the required gate, all three Electron shards, desktop unit suites/build/types/lint, iOS simulator tests, Android build/UI tests, Linux x64/arm64/Fedora packages, and CLI/catalog/policy checks. Hermes and Pullfrog found no new issues; all review threads are resolved. The branch is current with main. Earlier failure evidence is retained above.

Main merge (2026-10-08, 983dda313)

Merged origin/main (bots rework #377, Android localization #374, Mac-only agent notice). Conflict resolutions:

  • iOS AidenQuestionCard.model is now optional so the Bot session card (which has no run to stop) keeps compiling; stopButton is nil there. The stop XCTest unwraps it.
  • Android question card keeps one-question-at-a-time navigation and uses string resources, adding chat_question_next.
  • The Bot chat pane unit test and bots-starter.spec.ts (both from main) now choose an option and then press Submit, matching this PR's select-then-submit composer.

Flaky test on 983dda313: Electron E2E (1/3) reported environment-devices-agent.spec.ts:108 › agent access admits device tools, pins agent-device on PATH, asks before closing, and revokes cleanly as flaky: Send message was still disabled 30s after the textarea fill, and the runner retry passed. This spec came from main (#391) and does not touch the question or approval UI. The failed job was rerun once, and no timeout or retry policy was changed.

@very-hermes-bot very-hermes-bot 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.

Inline review — 1 finding(s) anchored to the diff. See the pinned summary comment for the overview.

@very-hermes-bot

very-hermes-bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Hermes Review Bot

Confidence: 5

Engine: agy/gemini-3.8-flash-high
Review mode: full
Head: 983dda313adee8f96cc8f3cbc7c99cca33d6552a
Generated: 2026-10-09T01:12:35+00:00
Reviews: 1

Summary

Scheduled task approval arguments are decoupled from hidden Symbol properties and stored in invocation-scoped WeakMaps, preventing argument digest failures during Pi runtime hashing while retaining exact model and connector permissions. Across desktop, iOS, and Android, pending questions now replace the active composer with a tabbed interface that displays one question at a time and preserves answers and custom drafts across tabs. Desktop can also discover and resolve pending questions started from a paired mobile device via host-authority IPC routes. Maintainers should double-check that long-running Electron shutdown bounds remain healthy across all environments during CI execution.

Confidence Score: 5/5

Every changed execution path across the desktop renderer, main process remote streams, iOS feature views, and Android Compose cards was traced and verified against repository contracts and tests.

📁 Important Files Changed
  • main/services/schedule-tool.ts: Migrates approval metadata from object Symbol properties to invocation WeakMaps (approvedMcpByArguments and preparedStandardByArguments) and omits undefined workspaceId values from canonical arguments.
  • renderer/components/ask-user-question-composer.tsx: Restyles the desktop questionnaire to sit in the composer area with accessible tabbed navigation (role="tablist" / role="tabpanel"), answer persistence, and explicit option selection before submission.
  • main/services/aiden-remote-streams.ts & main/handlers/aiden-remote.ts: Adds pendingQuestionForChat and respondQuestionFromHost to query and settle phone-initiated questions through host authority.
  • renderer/lib/hosts/local-host-adapter.ts: Routes questions tagged with source: "remote" through aidenRemoteApi.respondQuestion rather than local renderer questionnaire channels.
  • renderer/components/chat-approval-card.tsx: Discloses comprehensive task metadata (instructions, model, permissions, timezone, and scheduler status) and blocks approval when schedule details are malformed.
  • ios/AidenOnTheGo/Features/Remote/AidenChatFeature.swift & ios/AidenOnTheGo/Models/AidenChat.swift: Implements AidenQuestionComposerDraft for tabbed questions, binds the shared Stop control during questions, and moves one-shot dictation launch tracking to AidenChatViewModel.
  • android/app/src/main/java/sbtbiswas/AidenOnTheGo/features/chat/AidenQuestionCard.kt & AidenChatDetailScreen.kt: Replaces the Android message composer when questions are pending and introduces tabbed, scroll-bounded question selection.
  • renderer/components/environment-panel.tsx: Changes EnvironmentWorkbench outer overflow to overflow-clip to prevent focus panning beneath the sidebar in compact windows.

Findings

No findings.

📊 Sequence Diagram
sequenceDiagram
    autonumber
    participant Phone as Phone / Remote Client
    participant RemoteService as AidenRemoteStreamService
    participant Desktop as Desktop ChatPane / LocalHostAdapter
    participant PiAgent as Pi Tool Runner

    Phone->>RemoteService: POST /streams (start run)
    PiAgent->>RemoteService: ask_user_question prompt
    RemoteService-->>Desktop: remote:approval-changed (chatId)
    Desktop->>RemoteService: remote:getPendingQuestion (chatId)
    RemoteService-->>Desktop: AidenRemotePendingQuestion (source: "remote")
    Note over Desktop: Replaces composer with tabbed AskUserQuestionComposer
    Note over Desktop: User reviews tabs and selects answers
    Desktop->>RemoteService: remote:respondQuestionFromHost (chatId, promptId, response)
    RemoteService->>RemoteService: parseAskUserQuestionResponse & resolveQuestion
    RemoteService-->>PiAgent: deliver validated question response
    RemoteService-->>Desktop: { status: "answered" }
    RemoteService-->>Phone: stream event (question resolved)
    Note over Desktop: Restores standard message composer
Loading

Machine-Readable Findings

[]

Last reviewed commit: 983dda313ade
Reviews (1) · Comment /hermes review to trigger a new review · /hermes review full for full re-review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The iOS composer replacement removes run cancellation while questions are pending and can restart dictation without another user action when the composer returns.

Reviewed changes Reviewed the complete scheduling-approval, question-composer, and remote-question ownership changes across desktop, iOS, and Android.

  • Approval dispatch: Moves scheduling approval metadata outside JSON tool arguments while preserving approved runtime and connector scope.
  • Question composers: Adds numbered tabs, retained answers, bounded scrolling, and native composer replacement.
  • Remote ownership: Restores phone-owned questions on desktop and settles answers through their original main-process owner.
  • Scheduling entry points: Opens suggestions as editable chat drafts and expands validated approval disclosures.

Verification: scheduling, Assistant automation, question, and focused remote/IPC/adapter suites passed (158, 182, 21, and 90 test executions respectively). Root/e2e TypeScript checks, focused ESLint, and Electron test collection passed. iOS XCTest and Electron execution were not run on this Linux runner. Android verification did not complete: the dependency-enabled retry returned Tool 'shell' timed out after 120000ms. Consider increasing timeoutMs or optimizing the tool implementation.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes Reviewed a0ac3da6 against the prior Pullfrog-reviewed commit ee2f8e28, with the complete PR diff as context.

  • Restored cancellation: Shared the gated iOS Stop control between message and question composers, preserving run cancellation without answering or skipping the question.
  • Consumed dictation intent: Moved one-shot voice-launch state into the chat model so restoring the composer cannot restart capture.
  • Prevented focus panning: Made the desktop workbench boundary non-scrollable and prevented custom-answer focus from scrolling ancestors, while retaining child scrollports.
  • Strengthened verification: Recorded remote-adapter dispatches explicitly, added iOS cancellation/dictation regressions, and retained the compact-window no-sidebar-overlap assertion while waiting for settled layout.

Verification: 21 question tests, 6 local-host adapter tests, and 14 Environment layout/state tests passed. E2E TypeScript and scoped ESLint passed; 14 affected Electron scenarios were collected, not executed. Native iOS tests and Electron scenarios were not run on this Linux reviewer environment. Exact-head CI remains in progress, so this approval is a code-review result, not confirmation of a green merge gate.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes Reviewed e246addf against the prior Pullfrog-reviewed commit a0ac3da6, with the complete PR diff as context.

  • Replaced brittle verification: Removed the shipping-inventory assertion tied to the old composer-local voice guard and extended the existing read-only XCTest to require zero microphone starts through the real launch-admission method.
  • Updated audit evidence: Recorded the test correction and reported release-policy and focused simulator verification; production behavior is unchanged in this delta.

Verification: npm run test:ios-release passed all 20 Ruby tests and 32 Node tests. The new XCTest was inspected but not executed because xcodebuild is unavailable on this Linux runner. This approval is a code-review result, not confirmation of a green exact-head CI merge gate.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@sambitcreate

Copy link
Copy Markdown
Owner Author

/hermes review

Resolve conflicts with the bots rework, Android localization and the
iOS Mac-only agent notice. The iOS question card's chat model is now
optional so the Bot session card (no run to stop) keeps compiling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

No configured credential can serve this run. Every credential configured for openai/gpt-6.1-sol was rejected or is out of quota, so the agent never ran.

  • CODEX_AUTH_JSON from account scope: rejected with 401 — re-authenticate with pullfrog auth codex, or switch this repo to a model you hold an API key for. Re-authenticate →

Model settings → · Ask in Discord →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-6.1-sol | 𝕏

The tabbed question composer selects a single-select option and answers
on Submit, so the Bot chat test from main now chooses then submits, and
checks that choosing alone does not answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

No configured credential can serve this run. Every credential configured for openai/gpt-6.1-sol was rejected or is out of quota, so the agent never ran.

  • CODEX_AUTH_JSON from account scope: rejected with 401 — re-authenticate with pullfrog auth codex, or switch this repo to a model you hold an API key for. Re-authenticate →

Model settings → · Ask in Discord →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-6.1-sol | 𝕏

Single-select options in the tabbed question composer select first and
answer on Submit; the starter Bot spec from main now does both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

No configured credential can serve this run. Every credential configured for openai/gpt-6.1-sol was rejected or is out of quota, so the agent never ran.

  • CODEX_AUTH_JSON from account scope: rejected with 401 — re-authenticate with pullfrog auth codex, or switch this repo to a model you hold an API key for. Re-authenticate →

Model settings → · Ask in Discord →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-6.1-sol | 𝕏

@sambitcreate
sambitcreate merged commit 57aaa49 into main Oct 9, 2026
47 of 50 checks passed
@sambitcreate
sambitcreate deleted the t3code/fix-scheduled-task-approval branch October 9, 2026 01:51
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