Skip to content

feat(plans): drag draft schedule dates and intervals - #884

Merged
cristim merged 3 commits into
mainfrom
feat/plan-draft-drag
Oct 15, 2026
Merged

cristim merged 3 commits into
mainfrom
feat/plan-draft-drag

Conversation

@cristim

@cristim cristim commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Adds horizontal dragging to the existing Create/Edit schedule preview. Individual dates and Start/End interval handles keep the step count and targets unchanged, cancellation restores the prior draft, and keyboard controls and UTC date inputs remain available.

Dates stay local to the preview and are discarded on close. Save Plan does not apply these draft dates, and saved history and approval state are not represented here.

Reviewed head: 56b636333e956a9ad6c944f631ecea8c1e902ec5.

  • Two retained source reviews and two independent cold transfer passes cover this exact commit.
  • The independent verifier rebuilt the original commit, passed 246 affected tests before and after restoration, typecheck and lint, and exercised four responsive widths plus two additional touch-commit and keyboard cases. The complete frontend and build inputs are byte-identical after rebasing, and retained artifacts were independently rechecked. These executions were transferred, not rerun.
  • Actual-parent and move/rollback mutations failed the intended assertions, then restored tests passed. Refreshed normal hooks passed on the new head.
  • Browser API/auth fixtures are explicit. Native mouse/touch, cancellation, background scrolling, visible focus and zero API writes were checked. Backend Save and purchase verification remain separate.

New-head CI and normal merge protections remain required.

Refs #631

Summary by CodeRabbit

  • New Features
    • Drag schedule dates and start/end boundaries in the preview, or use keyboard controls to move them by one day.
    • Touch-friendly chart controls make date adjustments easier on mobile.
  • Improvements
    • Invalid moves are rejected, and canceled gestures restore the original dates. Date inputs remain available if dragging cannot start.
    • The chart keeps its date scale steady during a drag and shows clearer interaction and keyboard-focus states.

@cristim cristim added urgency/this-sprint Within the current sprint triaged Item has been triaged priority/p1 Next up; this sprint severity/high Significant harm impact/many Affects most users effort/xl Multi-week / refactor type/feat New capability labels Oct 15, 2026
@cristim

cristim commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Independent review and local verification cover exact head 56b636333e956a9ad6c944f631ecea8c1e902ec5, parent 842ec3519d35b0ec97269b92332eaf6721d4f0d4, tree 38d675c15d6fb3777058caf311da5b0a7898ae29. The standing owner review exception uses independent GPT-6.1 Sol medium review and realistic local UI verification.

The retained non-author reviewer completed two adversarial source passes and two exact refreshed-commit binding passes with no actionable findings. A separate cold reviewer independently rebuilt and exercised the production frontend, passed 246 affected Jest tests before and after scratch restoration, typecheck and lint, and passed four responsive browser cases plus two independently authored touch-commit and keyboard cases. Actual-parent, pointer-move and rollback mutations each failed the intended matcher assertion with zero runtime-error suites, then restored tests passed.

After the normal unpublished rebase, both reviewers checked the actual new commit and its unchanged four-file feature diff. The cold reviewer completed two transfer passes, rechecked the complete frontend/build-input tree, all 402 retained build-artifact hashes and runtime evidence hashes. The original test/browser executions were on 0bf56b268de101a5aa6f25dc24dc06b20df090a4 and transfer by verified byte identity, with no rerun or new backend-test claim. Normal hooks also passed on the refreshed head.

Source checks include gesture snapshots and frozen grab offsets in frontend/src/plan-schedule-preview.ts, fresh ordered UTC validation in frontend/src/lib/plan-draft-dates.ts, cancellation and modal focus cleanup, and scoped HTML touch targets in frontend/src/styles/plans.css. Real browser input covered individual dates and interval handles, touch movement/commit/cancel, capture loss, Escape rollback, native background panning with a positive scroll delta, keyboard alternatives and visible focus.

The production bundle used fixture API responses and seeded authentication. This verifies the local hypothetical preview and zero API writes, with no saved-history, backend Save, approval, provider or purchase claim. Exact-head CI, actual findings and normal merge protections remain required.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 13 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: LeanerCloud/cloud-commitments-platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 3fe15385-ef01-4b43-a090-a5618ffff66c
📥 Commits

Reviewing files that changed from the base of the PR and between 56b6363 and 145a868.

📒 Files selected for processing: 1
  • frontend/tests-e2e/plan-schedule-preview.spec.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LeanerCloud/cloud-commitments-platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: c30b606b-04a7-49ca-a25f-a8673f2d6f23
📥 Commits

Reviewing files that changed from the base of the PR and between 842ec35 and 56b6363.

📒 Files selected for processing: 4
  • frontend/src/__tests__/plan-schedule-preview.test.ts
  • frontend/src/plan-schedule-preview.ts
  • frontend/src/styles/plans.css
  • frontend/tests-e2e/plan-schedule-preview.spec.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

📝 Walkthrough

The schedule preview now supports pointer dragging and keyboard editing for draft dates and interval boundaries. It validates gesture coordinates and date ordering, restores dates after canceled or invalid gestures, and adds unit and end-to-end coverage for pointer, touch, keyboard, and accessibility behavior.

Changes: Schedule preview date interaction

Layer / File(s) Summary
Chart targets and date domain
frontend/src/plan-schedule-preview.ts, frontend/src/styles/plans.css
The chart adds larger step hit targets and interval handles. It uses a stable date domain during gestures and styles touch targets, interval markers, and focus outlines.
Date gesture and boundary controls
frontend/src/plan-schedule-preview.ts
Pointer gestures can update a step date or redistribute dates from a boundary. Keyboard controls adjust dates and activate boundary inputs. Invalid or canceled gestures restore the prior dates, and closing the modal cancels an active gesture.
Gesture and accessibility coverage
frontend/src/__tests__/plan-schedule-preview.test.ts, frontend/tests-e2e/plan-schedule-preview.spec.ts
Unit and end-to-end tests cover pointer and touch interactions, keyboard controls, cancellation, invalid movement, capture failures, focus outlines, and touch scrolling.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SVGTarget
  participant PreviewState
  User->>SVGTarget: Start primary-pointer gesture
  SVGTarget->>PreviewState: Capture pointer and initial date state
  User->>SVGTarget: Move pointer within plot
  SVGTarget->>PreviewState: Convert coordinates and update draft date
  User->>SVGTarget: Release pointer
  SVGTarget->>PreviewState: Validate gesture and commit or restore dates
Loading
Merge Risk: ⚪ Minimal · up to 56b63

This adds drag editing to the schedule preview's draft dates. It changes only local preview state and is covered by tests for pointer, touch, keyboard, and cancellation behavior. No concrete merge-blocking risk was found, and the normal CI checks still apply.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding drag interactions for draft schedule dates and interval boundaries.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@cristim

cristim commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Independent fix-round verification covers 240aa76, tree ce68d826eed1364f030b06e5a066bb6120821e2d, parent 56b6363. Two adversarial passes found no actionable findings.

The follow-up changes only the browser test context: phone widths use mobile emulation, desktop widths retain desktop emulation. All behavior assertions, including positive native background-pan movement, remain unchanged. Fresh independent macOS production-browser verification passed four widths, with an additional mobile touch-commit and keyboard check passing. Actual context receipts confirm desktop false and phone true; captured API writes and errors were empty.

The prior 246 tests, typecheck, lint, production build and semantic mutation evidence transfer through unchanged production inputs and verified artifacts; they were not rerun. Browser APIs and authentication are fixtures. This verifies the local hypothetical graph interaction, not backend Save, history, approvals or real purchases. The prior Linux failure is preserved; the correction remains unproven on Linux until this exact head passes CI.

@cristim
cristim force-pushed the feat/plan-draft-drag branch from 240aa76 to 50ab58a Compare October 15, 2026 12:11
@cristim

cristim commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Rebased onto main 282c7e1d99026570ffd4560385e7fc09b6284ed3; new head is 50ab58ab651654e583b385853864ccf22af7bba7. Published with an explicit lease against prior head 240aa76a24c54e59bed01292a1db2dd380b41cbe.

Two independent source-review passes verified both commits retain identical patches, the complete frontend tree is unchanged (5dd489a8b698ced08a8934c28208e2024f84965d), and the frontend E2E workflow is unchanged. The normal actionlint hook passed all actual workflows on macOS. Prior Mac browser/Jest evidence transfers by unchanged source and build inputs; it is prior local evidence, not a new Linux result.

The known Linux native-pan failure remains unresolved and blocks merging this PR. New CI runs are watched. The frozen 64-line diagnostic is being prepared as a separate investigation-only PR stacked on this head, with all existing assertions retained and no product changes.

@cristim

cristim commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

New-head CI results for 50ab58ab651654e583b385853864ccf22af7bba7: main CI, pre-commit, frontend build and sentinel passed.

Linux frontend E2E reproduced the known failure: 150 passed, two failed at 390px and 320px, with the positive-pan assertion expecting scroll movement above zero and receiving zero. This remains a merge blocker.

The exact frozen experiment is now stacked investigation PR #889, whose Linux matrix run is active. It changes no product files and must never merge.

@cristim

cristim commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Head 145a868d5435b2bd29278e7c6323bafc59cc89ad replaces only the mobile pan input command. It uses the direct touchStart → 12 frame-separated touchMoves → touchEnd → two frames sequence proven by the Linux diagnostic. Product code, coordinates, SVG/non-control/auto hit checks, positive-pan polling, all-label equality and session cleanup are unchanged. The full PR is 385 changed lines across four files.

Retained independent gpt-6.1-sol medium review completed two clean source/staged passes and bound the actual commit to reviewed tree 34e68a33907777cce4d7ec439a85981566e79333. No actionable findings. The reviewer independently inspected raw Linux matrix attachments, exact source equivalence and the Mac proof/mutation artifacts; it did not rerun the new browser case itself.

Actual author-executed Mac browser proof against the existing production-built static bundle: both affected viewports passed (390px and 320px, two tests, no retry/skip). A scratch copy omitting only the touchMove loop failed at the unchanged positive-pan assertion with zero movement; restoring that loop passed. These are browser fixtures with mocked API responses, no writes. Node 24.21.0 and unchanged production build/dependency inputs were verified. Ordinary commit hooks passed.

Renewed Linux E2E and main CI are running and watched, alongside pre-commit and frontend checks. Their actual outcomes remain required before merge. No DOM event-stream, hardware-gesture or inertia-equivalence claim is made. Draft diagnostic #889 remains frozen investigation evidence and must never merge.

@cristim

cristim commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Actual Linux regression verification passed on head 145a868d5435b2bd29278e7c6323bafc59cc89ad: E2E run 38736293446 completed with 152 passed. Both previously failing mobile cases passed: 390px in 6.8 seconds and 320px in 6.9 seconds. The 1440px and 1280px cases also passed. No assertion was weakened or skipped.

Checkout logs show the tested merge combines this exact head with current main 8386d4870f6b0da32bc4ae411ebc06bec13422aa, covering the subsequent disjoint storage refactor as well. This replaces the prior Linux result of 150 passed and two zero-pan failures.

Pre-commit, frontend build and sentinel checks also passed. Main CI remains running and required before the merge owner's normal merge. The exact-head independent review and Mac mutation proof remain unchanged; draft diagnostic #889 stays frozen and must never merge.

@cristim

cristim commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

All gates now cover unchanged head 145a868d5435b2bd29278e7c6323bafc59cc89ad:

  • Main CI completed successfully, including integration tests and CI Success.
  • Linux E2E passed all 152 tests, including both previously failing mobile pan cases with the original assertions retained.
  • Pre-commit, frontend build and sentinel checks passed.
  • Exact-head independent review and actual Mac mutation proof cover the committed tree. Evidence distinguishes author execution from independent source/artifact inspection.

Fresh inspection reports head unchanged, base 8386d487, CLEAN and MERGEABLE, with no inline review findings. Main's ruleset requires CI Success and Run pre-commit hooks, both successful. Ready for the merge owner's normal merge; no bypass needed. Draft investigation #889 must never merge and its failed artifacts remain preserved.

Follow-up issues filed: none, confirmed against the exit checklist. The remaining broader editor work stays tracked by #631.

@cristim

cristim commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Review disposition: CodeRabbit's current-head automatic review hit its included quota; no paid review or retry was requested. Exact-revision independent review plus local verification covers this head under the project's optional-CodeRabbit rule.

The retained summary's historical docstring-coverage advisory is dismissed: it identifies no missing behavioral contract or specific undocumented API, and adding generic docstrings would conflict with the project's rule to add comments only when they explain a necessary why. Independent review found no actionable documentation defect. The historical review itself reported no actionable comments, and the current inline findings list is empty.

@cristim
cristim merged commit 51df617 into main Oct 15, 2026
28 checks passed
@cristim

cristim commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Post-merge verification complete for 51df61773de46f5bd2337a380d0656c983b99977.

The entire merged tree 3959f718d9cb9dc0c71b8d83b2d9fbc819c43617 matches the exact pre-merge tree that passed Linux E2E. All frontend files also match reviewed head 145a868d byte for byte.

All five actual post-main runs completed successfully: main CI, pre-commit, frontend sentinel, frontend E2E, and automatic AWS deployment. Post-main E2E passed all 152 tests, including the 390px and 320px pan cases. Deployment readiness, health-endpoint and smoke-test steps passed. No manual deployment was triggered; a separate deployed-browser interaction was not performed here.

The borrowed feature branch/worktree and draft diagnostic #889 remain intact, together with original failed artifacts and backup refs. #889 stays draft at 363d7b09 and must never merge. All owned CI watcher handles reached terminal states and were collected.

Follow-up issues filed: none, confirmed against the exit checklist. Broader editor work remains tracked by #631.

@cristim
cristim deleted the feat/plan-draft-drag branch October 16, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/xl Multi-week / refactor impact/many Affects most users priority/p1 Next up; this sprint severity/high Significant harm triaged Item has been triaged type/feat New capability urgency/this-sprint Within the current sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant