You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add plan refinement and confirmation-gated approve/execute notification intents #1725
Plan-ready notifications must deep-link into Planner Studio and offer Refine and Approve/Execute actions. Approving or launching agent work is materially consequential and must never occur from a background push click or an unconfirmed query parameter.
Requirements
Add a small parser for notification intent query parameters.
Support refine and approve_execute intents for plan notifications.
Refine opens Planner Studio's existing refinement UI and focuses its input.
Approve/execute opens an in-app confirmation dialog summarizing repository, issue count, agent/model selection, and PR behavior.
Do not execute until all existing plan validation and selection requirements pass.
Reuse existing Planner Studio approve/finalize/execute callbacks rather than duplicating API calls.
Remove the intent query parameter after it has been consumed to prevent repeat execution on refresh/back navigation.
Respect demo mode and disabled action states.
Add plan-specific action buttons to the Inbox.
Acceptance Criteria
Refine navigates to the correct draft and focuses the refinement composer.
Approve/execute never runs automatically from URL navigation.
Cancel closes the confirmation without mutating the plan.
Confirm invokes the same validated handler as the existing desktop/mobile plan control.
Refreshing after confirmation does not repeat the action.
Demo mode shows the existing read-only explanation.
Treat notification actions as foreground UI intents, not executable commands. The URL carries only a request to open an existing workflow. Planner Studio consumes the intent and delegates to its established handlers after rendering confirmation. A new backend shortcut endpoint was rejected because it would bypass existing agent/model, dependency, and PR-option validation.
File: propr-ui/src/hooks/useNotificationIntent.ts (new file)
Why this file: A shared, one-shot query parser prevents task and plan pages from independently implementing unsafe repeatable intent behavior.
import{useCallback,useMemo}from'react';import{useSearchParams}from'react-router-dom';exporttypeNotificationIntent='refine'|'approve_execute'|'follow_up'|'stop';exportfunctionuseNotificationIntent(allowed: NotificationIntent[]){const[searchParams,setSearchParams]=useSearchParams();constintent=useMemo(()=>{constvalue=searchParams.get('intent')asNotificationIntent|null;returnvalue&&allowed.includes(value) ? value : null;},[allowed,searchParams]);constconsume=useCallback(()=>{constnext=newURLSearchParams(searchParams);next.delete('intent');next.delete('notification');setSearchParams(next,{replace: true});},[searchParams,setSearchParams]);return{ intent, consume };}
File: propr-ui/src/components/Inbox/PlanNotificationActions.tsx (new file)
Why this file: The Inbox should only navigate to Planner Studio with an intent; it must not finalize or execute a plan from the list itself.
Why this file: PlanEditor already owns the mobile review/refinement layout and the validated approval handler. It is the correct place to consume plan intents.
--- a/propr-ui/src/components/TaskPlanner/PlanEditor.tsx+++ b/propr-ui/src/components/TaskPlanner/PlanEditor.tsx@@ -1,5 +1,8 @@+import { useEffect, useState } from 'react';+import { useNotificationIntent } from '../../hooks/useNotificationIntent';+import { NotificationPlanIntentDialog } from './NotificationPlanIntentDialog';@@ -80,6 +83,20 @@+ const { intent, consume } = useNotificationIntent(['refine', 'approve_execute']);+ const [showNotificationConfirmation, setShowNotificationConfirmation] = useState(false);++ useEffect(() => {+ if (intent === 'refine') {+ // Reuse the existing mobile refinement panel so notification entry behaves+ // exactly like a user selecting Refine from Planner Studio.+ setMobileView('refine');+ consume();+ } else if (intent === 'approve_execute') {+ setShowNotificationConfirmation(true);+ // Consume before confirmation so refresh cannot repeat a confirmed action.+ consume();+ }+ }, [consume, intent]);@@ -220,6 +237,18 @@+ <NotificationPlanIntentDialog+ open={showNotificationConfirmation}+ repository={draft.repository}+ issueCount={plan.tasks.length}+ summary={executionSummary}+ disabled={isDemoMode || isApproveDisabled}+ onCancel={() => setShowNotificationConfirmation(false)}+ onConfirm={async () => {+ // Delegate to the existing handler so dependency, model, and PR-option+ // validation cannot drift between normal and notification entry points.+ await handleApproveAndExecute();+ setShowNotificationConfirmation(false);+ }}+ />
File: propr-ui/src/pages/InboxPage.tsx
Why this file: Render the plan action component for plan targets.
Activity
propr-dev commentedon Aug 2, 2026
Suggested Implementation:
Implementation Approach
Treat notification actions as foreground UI intents, not executable commands. The URL carries only a request to open an existing workflow. Planner Studio consumes the intent and delegates to its established handlers after rendering confirmation. A new backend shortcut endpoint was rejected because it would bypass existing agent/model, dependency, and PR-option validation.
File:
propr-ui/src/hooks/useNotificationIntent.ts(new file)Why this file: A shared, one-shot query parser prevents task and plan pages from independently implementing unsafe repeatable intent behavior.
File:
propr-ui/src/components/Inbox/PlanNotificationActions.tsx(new file)Why this file: The Inbox should only navigate to Planner Studio with an intent; it must not finalize or execute a plan from the list itself.
File:
propr-ui/src/components/TaskPlanner/NotificationPlanIntentDialog.tsx(new file)Why this file: The confirmation presents enough context for a deliberate decision and delegates the actual work to existing validated handlers.
File:
propr-ui/src/components/TaskPlanner/PlanEditor.tsxWhy this file: PlanEditor already owns the mobile review/refinement layout and the validated approval handler. It is the correct place to consume plan intents.
File:
propr-ui/src/pages/InboxPage.tsxWhy this file: Render the plan action component for plan targets.
propr-dev commentedon Aug 24, 2026
🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
codexgpt-5.6-sol1725/gpt-5.6-sol-add-plan-refinement-and-c-20260824-2115-tyh1716-epic-failed-to-3m8issue-1725-20260824-2115-gpt-5.6-sol-tyh🔍 Track Task Execution
fix(ai): Resolve issue #1725 - Add plan refinement and confirmation-g…
[1725 by GPT-5.6 Sol] Add plan refinement and confirmation-gated appr…
[Epic] PWA & Web push (#1731)