Sub-epic: Goal operator experience - #2020
Conversation
…GitHub issue #2011: Summary New files created: 1. `src/api/goalsApi.ts` — Typed API module with: - `GoalListItem`, `GoalsListResponse`, `CreateGoalParams` types - `GoalState`, `AutoMergePolicy`, `UltrafixMode` type unions - `getGoals()`, `createGoal()`, `getGoal()`, `pauseGoal()`, `resumeGoal()`, `cancelGoal()` API functions following the existing `apiFetch`/`handleApiResponse` pattern 2. `src/pages/GoalsPage.tsx` — Goals list/summary page with: - URL-driven filter state (`?state=`, `?search=`, `?page=`) that persists across navigation - Debounced search (300ms), state filter dropdown, pagination - Empty states (no goals, no search results, no filter results) - Demo mode awareness (disables "New Goal" button with explanation) - Loading and error states following the PlansPage pattern 3. `src/pages/GoalsPageComponents.tsx` — Supporting components: - `GoalStateBadge` — colored state pill for all 7 lifecycle states (active/pausing/paused/recovering/completed/failed/cancelled) - `GoalRow` — rich list item showing objective, repository, state, checklist progress bar, agent/model (with requested→effective display when different), active tasks, issue stats, tokens, elapsed/paused time, auto-merge policy, latest event, connection/recovery state, epic PR link - `EmptyGoalsState` — three empty state variants - `GoalsList` — wraps goal rows in a bordered container - `GoalsPagination` — prev/next with page count and total 4. `src/pages/GoalCreatePage.tsx` — Goal creation form with: - Objective textarea (10-char minimum validation) - Repository selector (populated from instance catalog) - Agent + model selector (catalog-filtered, model auto-updates on agent change; explains that model changes apply at safe boundaries) - Max concurrent tasks (1–20 numeric input) - Auto-merge policy (radio group: disabled/on-approval/all) - UltraFix mode (radio group: disabled/enabled/until-goal/max-cycles with inline sub-fields) - Client-side validation with field-level errors and accessible labels - Submit/cancel, pending state with spinner, demo mode banner + disabled submit - Error display for server errors including demo-mode-read-only Modified files: 5. `src/App.tsx` — Added lazy imports and routes for `/goals` and `/goals/new` 6. `src/components/Layout.tsx` — Added "Goals" entry (with `Target` icon) between Plans and Tasks in the sidebar nav 7. `src/components/MobileBottomNavigation.tsx` — Added Goals to the "More" sheet and to the `getNavigationState` active matching logic
…or commits. Implemented the PR #2016 follow-up without backend changes or commits. Key fixes: - Split `App.tsx` to 287 lines and `GoalCreatePage.tsx` to 56 lines. - Added all ten contractual goal states; removed `active`. - Added explicit goal-capability catalog filtering for agents and models. - Corrected Ultrafix to enabled + independent 1–10 goal and max cycles. - Added reusable creation idempotency keys, including token-refresh replay. - Centralized #2006 compatibility normalization in [goalsApi.ts](/tmp/git-processor/worktrees/integry/propr/pr-2016-followup-2026-08-31T00-35-49/propr-ui/src/api/goalsApi.ts). - Made requested/effective models visually explicit. - Replaced the nested epic-PR link with valid sibling interactive elements. - Added focused API, routing, creation, list, socket, accessibility, demo-mode, and mobile-navigation tests. Verification passed: - Focused tests: 34/34 - Full UI suite: 492/492 - UI typecheck - Shared-package typecheck - ESLint with `--max-warnings=0` - Production build - `git diff --check` PR: #2016 Comment by: @integry (ID: 5472246169) Model: gpt-5.6-sol
…ting.
Implemented the second owner validation pass without committing.
Key changes:
- Canonical `{ goals, nextCursor }` contract with bounded keyset queries and strict V1 wire decoding in [goalsApi.ts](/home/node/workspace/propr-ui/src/api/goalsApi.ts) and [goalContracts.ts](/home/node/workspace/propr-ui/src/api/goalContracts.ts).
- URL-backed cursor history, back/forward restoration, stale-request suppression, and coalesced goal-specific realtime invalidation in [useGoalsList.ts](/home/node/workspace/propr-ui/src/pages/useGoalsList.ts).
- Removed unkeyed pause/resume/cancel helpers.
- Payload-aware idempotency retry/rotation and conflict recovery.
- Exact creation bounds, including cleared-input validation.
- Required, fail-closed goal capability metadata and allowlist intersection.
- Explicit not-yet-projected statistics instead of fabricated zeros.
- Mobile search, labeled checklist progressbars, demo explanation, and epic/sub-epic/leaf PR creation copy.
Validation results:
- Focused UI tests: `54/54` passed.
- Full UI suite: `70 files, 509 tests` passed.
- `npm run test:unit`: `277/277` passed.
- UI/shared/API typechecks: passed.
- Root/UI/API lint with zero warnings: passed.
- Root/shared/API/UI builds: passed.
- Changed-file workspace lint: passed.
- `git diff --check`: passed.
- `npm run test:full`: `307/308` test runs passed. Only `test/llmMetrics.test.ts` timed out after 180 seconds because Redis was unavailable at `127.0.0.1:6379`; no Redis server, client, or Docker runtime is installed. The suite continued and its final UI run passed all 509 tests.
No commit was created, as instructed. Current HEAD/base SHA: `b4e3c4fc6c24ec8bc9610b5989555168c52cf490`. The automation-generated commit will receive the final resulting SHA.
PR: #2016
Comment by: @integry (ID: 5475318194)
Model: gpt-5.6-sol
Implemented all four follow-up fixes: - Strict bounded base64url validation for response `nextCursor`, with malformed-cursor regressions. - Canonical trimmed search handling, whitespace omission, and 200 Unicode-code-point bounds across API, user input, and deep links. - Strict authoritative `activeSeconds` decoding, typing, and rendering alongside elapsed/paused time. - Removed the extra blank line at `goalContracts.ts` EOF. Validation passed: - Focused UI tests: 39/39 - Full UI test suite - UI typecheck, zero-warning lint, build - Shared/API typecheck and builds - API zero-warning lint - Root/API unit tests: 277/277 - Root typecheck, lint, build - `git diff --check` Current HEAD: `c41a4af18751432380c650373b7685cb099d7e59`. No commit or push was performed because the harness explicitly requires leaving changes uncommitted for automatic commit handling. PR #2016 was not merged or otherwise modified. PR: #2016 Comment by: @propr-dev[bot] (ID: 5475938027) Model: gpt-5.6-sol
Implemented F2–F4 only: - Removed goal-row navigation to the unavailable `/goals/:goalId` route; epic PR links remain. - Enforced and displayed a trimmed 10-character objective minimum with boundary tests. - Bound goals and `nextCursor` to the active query fingerprint, preventing stale rows/pagination after failed or out-of-order requests. - Left fail-closed capability behavior unchanged. Validation: - UI: 70 files, 520 tests passed - UI typecheck, zero-warning lint, and build passed - Shared typecheck/build passed - API typecheck/lint/build passed - API tests passed; one localhost Web Push test was transiently flaky and passed on isolated retry - `git diff --check` passed Per the critical handoff instruction, changes remain uncommitted and unpushed for the system to commit. Therefore, there is no new SHA to report. PR: #2016 Comment by: @propr-dev[bot] (ID: 5476296543) Model: gpt-5.6-sol
Implemented F6–F8 only. - Preserved canonical filtered/search/cursor state through `/goals/new`, including refresh-safe Back, Cancel, and successful-submit returns. - Added strict same-app `/goals` return-target validation to prevent open redirects. - Kept filters on empty later pages and exposed usable Previous navigation. - Enforced the 100-entry cursor-history boundary so all reachable pages remain parseable and reversible. - Preserved fail-closed catalog behavior; no Web Push changes. Validation passed: - Full UI: 70 files, 526 tests - Focused: 33 tests - UI typecheck - UI lint with zero warnings - UI production build - `git diff --check` Per workspace instructions, changes remain uncommitted for the system to commit and push. Current pre-change HEAD is `c39608bd1042`; therefore there is no new follow-up SHA yet. PR was not merged. PR: #2016 Comment by: @integry (ID: 5476649630) Model: gpt-5.6-sol
…s-navigation-crea-20260831-0012-ckg [2011 by Claude Sonnet 4.6] Add Goals navigation, creation workflow, and running summary
Validated by exact-head independent audit, full CI, and GPT-5.6 Sol review (9/10, no blockers).
Checks FailedValidation failed during setup, tests, CLI packaging, linting, or build checks. View Logs |
|
Owner integrated audit at exact head 4b910a8 found six combined-branch blockers. Keep this draft sub-epic PR unmerged and implement all six with Codex GPT-5.6 Sol only. Preserve every previously audited list/create/detail/operator behavior, replay fencing, content sanitization, authorization, accessibility, and test invariant.
Run focused adversarial tests, the complete UI tests, typecheck/lint/build, full repository suite where available, and |
|
✅ Applied the requested follow-up changes in commit 72bb909 Summary of ChangesImplemented all six audit blockers and left changes uncommitted as required. Key outcomes:
Validation passed:
The full repository suite completed through test file 159/308, then stalled at file 160 because Redis was unavailable ( 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…tted as required. Implemented all six audit blockers and left changes uncommitted as required. Key outcomes: - Authorization-bound goal list state and socket reauthentication with stale-response fencing. - Starvation-free list invalidation with one in-flight and one coalesced trailing refresh. - Goal-event retention capped at 1,000 across live, replay, and older-history ingestion. - Strict absolute-HTTPS list epic links. - Sanitized clipboard metadata/content with accessible success and failure states. - Exactly one `<main>` landmark across all goal routes through the real Layout. Validation passed: - Focused adversarial tests: 86 tests. - Complete UI suite: 74 files, 618 tests. - UI and repository typecheck, lint, and build. - `git diff --check`. The full repository suite completed through test file 159/308, then stalled at file 160 because Redis was unavailable (`ECONNREFUSED 127.0.0.1:6379`); the hung runner was stopped. No commit or PR operation was performed. PR: #2020 Comment by: @integry (ID: 5481209200) Model: gpt-5.6-sol
Checks FailedValidation failed during setup, tests, CLI packaging, linting, or build checks. View Logs |
|
Owner exact-head re-audit at 72bb909 found two remaining blockers. Keep the draft sub-epic PR unmerged and fix both with Codex GPT-5.6 Sol only, preserving all six now-verified functional corrections and their tests.
Run the focused adversarial tests, complete UI suite, UI/root typecheck/lint/build, |
|
✅ Applied the requested follow-up changes in commit 3c3585e Summary of ChangesImplemented both blockers in the PR worktree, leaving it uncommitted and unmerged as required.
Validation passed:
Current 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…committed and unmerged as required. Implemented both blockers in the PR worktree, leaving it uncommitted and unmerged as required. - Added an explicit viewport-anchor retention contract preserving the visible event sequence and pixel offset across repeated trims, older-page loads, gap recovery, and concurrent live arrivals. - Added deterministic cleanup/fallback coverage for empty, rejected, stale, and genuinely unavailable anchors. - Split all three oversized test files into focused suites and reusable harness modules. Largest affected test file is 335 lines; no max-lines disables or new suppressions remain. - Adversarial retention test verifies three 200-event loads, concurrent live events, stable row/offset, and the 1,000-event bound. Validation passed: - Focused adversarial terminal suite: 15/15 - Complete UI suite: 77 files, 621 tests - UI lint, typecheck, and build - Root lint, typecheck, and build - `git diff --check` - Suppression and trailing-whitespace scans Current `HEAD` remains `72bb909d17e1691800297ce265fef9b4d7d7f0d9`; the requested new exact head will be created by the surrounding commit system. PR: #2020 Comment by: @integry (ID: 5481686357) Model: gpt-5.6-sol
|
Owner full integrated re-audit at exact 3c3585e found one remaining HIGH long-gap reconciliation blocker. Keep this draft sub-epic PR unmerged and fix it with Codex GPT-5.6 Sol only, preserving the now-verified viewport anchor, finite retention, split no-suppression suites, and all prior six corrections. A gap replay larger than 1,000 events is trimmed to the retained display tail before Make replay/drain recovery propagate a bounded Add an adversarial >1,000-event gap test with lifecycle + message + usage events near the beginning and stdout-only retained tail. Assert prompt bounded |
|
✅ Applied the requested follow-up changes in commit 1448eae Summary of ChangesImplemented the long-gap reconciliation fix without committing or merging. Key changes:
Validation passed:
Only five scoped files changed. HEAD remains unmerged at 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ing or merging. Implemented the long-gap reconciliation fix without committing or merging. Key changes: - Replay now accumulates a bounded `detailChanged` signal before event retention eviction. - Recovery carries that signal across all replay pages and coalesced gap targets. - Each completed recovery window triggers at most one prompt detail reconciliation. - Existing identity and mutation-revision fences remain enforced. - Added >1,000-event adversarial coverage for lifecycle/message/usage eviction, exact cap/tail, anchor retention, dedupe, refresh coalescing, mutation fencing, and goal-switch fencing. Validation passed: - Focused gap/retention suites: 48 tests - Complete UI suite: 77 files, 623 tests - UI lint, typecheck, build - Root lint, typecheck, build - Suppression scan - `git diff --check` Only five scoped files changed. HEAD remains unmerged at `3c3585ecf430d0ea7472a7fcba4a22fdfc5d858f`; the surrounding system can publish the resulting exact head. PR: #2020 Comment by: @integry (ID: 5482134294) Model: gpt-5.6-sol
🔍 AI Code Review — gpt-5.6-solOverall EvaluationThis PR adds a substantial Goals operator experience with capability-aware creation, cursor-based listing, realtime invalidation, and detailed lifecycle controls. The visible implementation is thoughtfully tested, but it needs minor correctness fixes before its eventual integrated merge; the objective also explicitly prohibits merging it independently. This review is partial because the supplied diff omitted some files/ranges, and the full test suite remains pending. ✅ Fail-closed capability selection — Goal creation intersects explicitly goal-capable models with supported models and excludes disabled or malformed catalog entries. ✅ Strong stale-data fencing — List requests are scoped to authorization and query fingerprints, abort superseded requests, and discard stale cross-owner completions. ✅ Accessible operator controls — The changed UI includes route landmarks, labeled status regions, modal focus management, read-only gating, and explicit lifecycle/message states. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Edit-revert can duplicate goals
F2: 🔴 Unicode limits are inconsistent
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Abort catalog loads
S2: 🟢 Tighten cursor history
ScoreThe implementation is broad and well tested, but the idempotency flaw can duplicate a goal after an uncertain mutation, and Unicode bounds reject contract-valid input. The omitted diff ranges, explicit integration dependency, and pending full suite also limit final verification. Score: 6/10 🤖 Review Details
Files omitted from review diff1 file was omitted because patch content was unavailable from GitHub or did not fit the review context budget. Large, binary, generated, and lockfile changes are deprioritized.
🤖 Review by ProPR |
|
/fix F1 F2 |
|
✅ Applied the requested follow-up changes in commit 484efb7
Summary of ChangesImplemented only F1 and F2.
Verification passed:
No commit was created. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Implemented only F1 and F2. - F1: Preserved the previous payload/key across edits; submission now rotates only when the final payload differs. Added edit-then-revert coverage in [GoalCreatePage.test.tsx](/tmp/git-processor/worktrees/integry/propr/pr-2020-followup-2026-08-31T18-18-55/propr-ui/src/pages/GoalCreatePage.test.tsx). - F2: Objective and message inputs now clamp to 4,000 Unicode code points and no longer use UTF-16-based `maxLength`. Added 4,001-emoji regression tests. Verification passed: - 77 test files, 626 tests - TypeScript typecheck - ESLint on all touched files - `git diff --check` No commit was created. PR: #2020 Comment by: @integry (ID: 5482588682) Model: gpt-5.6-sol
|
Owner exact-head correction at The current first-4,000-code-point Use a non-destructive, composition-safe contract for both the objective and steering message:
Retain F1 and all prior replay/list/detail/auth/socket/viewport/terminal/accessibility/security behavior. Run focused tests, full UI suite, UI/root typecheck/lint/build, |
|
✅ Applied the requested follow-up changes in commit cc7beaa Summary of ChangesImplemented only F2; F1 remains untouched.
Validation passed:
HEAD remains 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Implemented only F2; F1 remains untouched. - Objective and steering drafts now preserve raw input, paste, and IME composition without slicing or `maxLength`. - Counters and validation use trimmed Unicode code-point length via [canonicalGoalText.ts](/tmp/git-processor/worktrees/integry/propr/pr-2020-followup-2026-08-31T18-34-24/propr-ui/src/utils/canonicalGoalText.ts:1). - Over-limit drafts remain editable, show actionable errors, and cannot submit. - API payloads contain the canonical trimmed value. - Added adversarial regressions for insertion positions, paste, whitespace, astral/combining characters, composition, payload agreement, and recovery. Validation passed: - Focused: 83 tests - Full UI: 77 files, 632 tests - UI/root typecheck, lint, and build - `git diff --check` - Suppression scan HEAD remains `484efb771bd72c6940857677b87e6e49046287d7`. No commit, merge, or PR state change was performed. PR: #2020 Comment by: @integry (ID: 5482758347) Model: gpt-5.6-sol
|
/review gpt-5.6-sol |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — gpt-5.6-solOverall EvaluationThis PR delivers a substantial Goals operator UI with creation, filtering, pagination, replay, lifecycle controls, steering, hierarchy, and statistics. However, it is not ready to merge independently: the catalog integration currently disables creation for every agent, and goal-detail reads do not enforce response identity. The supplied diff is explicitly partial, and the full test suite remains pending. ✅ Robust list state — Search, filters, and bounded cursor history are canonicalized in the URL, while stale and cross-authorization requests are fenced. ✅ Resilient operator experience — Replay enforces contiguous sequences, terminal retention is bounded, and realtime invalidations are coalesced with reconnect refreshes. ✅ Strong interaction coverage — The changed tests exercise Unicode limits, idempotency behavior, modal focus, demo-mode restrictions, pagination, and stale-response handling. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F3: 🔴 Creation is disabled for every agent
F4: 🔴 Goal reads do not verify identity
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Abort catalog loading
S2: 🟢 Index hierarchy dependencies
ScoreThe PR has thoughtful implementation and extensive targeted coverage, with no current check failure, but the creation workflow is unusable on this head and goal-detail identity is not safely enforced. The pending full suite and explicitly truncated review input add further verification uncertainty. Score: 5/10 🤖 Review Details
Files omitted from review diff2 files were omitted because patch content was unavailable from GitHub or did not fit the review context budget. Large, binary, generated, and lockfile changes are deprioritized.
🤖 Review by ProPR |
|
/fix F4 F3 is intentionally deferred to the integrated control-plane/catalog capability provider and is a fail-closed cross-sub-epic gate tracked in #2015; do not fabricate goal-capable agents or models on this isolated UI branch. Fix only F4 with an exact requested/decoded goal identity check, typed |
|
✅ Applied the requested follow-up changes in commit 37b79a3
Summary of ChangesImplemented F4 only.
Verification passed:
🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Implemented F4 only. - `getGoal` now decodes locally and verifies the decoded goal ID exactly matches the requested ID. - Mismatches throw typed `GoalContractError`. - Added mismatch and exact-match success regression coverage. - F3 remains untouched; no commit or merge performed. Verification passed: - API tests: 51/51 - TypeScript typecheck - ESLint - `git diff --check` PR: #2020 Comment by: @integry (ID: 5483179703) Model: gpt-5.6-sol
|
Owner exact-head validation is CLEAN at
F3 remains intentionally fail-closed on this isolated UI branch and is an explicit #2015 integration gate: the control-plane/catalog capability provider must supply real goal-capable agents/models. Keep this sub-epic draft unmerged until those cross-sub-epic contracts are integrated. |
|
Forced exact-head Full Test Suite run 33430054292 is now green on retry without any code change. The first attempt timed out only in the existing replay-pagination test |
|
Execute one narrow test-only Codex GPT-5.6 Sol correction at exact head Forced Full Test Suite run 33430054292 attempt 1 exposed a deterministic harness synchronization race in Fix only the test/harness contract:
|
|
✅ Applied the requested follow-up changes in commit b9e41cf Summary of ChangesImplemented the narrow test-only correction at base HEAD
Validation passed:
Changed only useGoalDetail.test.tsx and useGoalDetailTestHarness.tsx. No commit, push, or merge performed. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…7b79a3c5245f7d992e3c12aab1b0730dcb3cad3`. Implemented the narrow test-only correction at base HEAD `37b79a3c5245f7d992e3c12aab1b0730dcb3cad3`. - Harness now exposes `loadingOlder`/`hasMoreBefore` and disables older pagination while busy or unavailable. - Replay test waits for earliest-event advancement, idle state, and control re-enablement. - Added five bounded scenario repetitions and exact cursor/dedupe/retention/live-tail assertions. - No production files or behavior changed; F3 untouched. Validation passed: - Focused replay suite: 10 consecutive runs - Shared replay/race suite: 22 tests - Full UI suite: 77 files / 633 tests - Typecheck, lint, build - `git diff --check` Changed only [useGoalDetail.test.tsx](/tmp/git-processor/worktrees/integry/propr/pr-2020-followup-2026-08-31T19-48-39/propr-ui/src/components/GoalDetails/useGoalDetail.test.tsx:168) and [useGoalDetailTestHarness.tsx](/tmp/git-processor/worktrees/integry/propr/pr-2020-followup-2026-08-31T19-48-39/propr-ui/src/components/GoalDetails/useGoalDetailTestHarness.tsx:65). No commit, push, or merge performed. PR: #2020 Comment by: @integry (ID: 5483638830) Model: gpt-5.6-sol
|
Owner exact-head revalidation is CLEAN at
Keep this sub-epic draft unmerged until #2015 integrates the real control-plane/catalog/runtime contracts. |
Goal operator experience
Tracks #2005 as the UI sub-epic of #2002.
This draft accumulates the dedicated Goals navigation, create/list workflow, and the operator detail experience. It remains draft until its child implementation work and cross-sub-epic contracts are integrated and validated.
Child work
Integration dependencies
Do not merge independently; this sub-epic will be validated as part of the final epic PR for #2002.