Skip to content

fix(frontend): preserve ladder selections when opening editor - #465

Open
cristim wants to merge 1 commit into
mainfrom
fix/ladder-form-selects
Open

cristim wants to merge 1 commit into
mainfrom
fix/ladder-form-selects

Conversation

@cristim

@cristim cristim commented Oct 1, 2026

Copy link
Copy Markdown
Member

Opening an existing ladder editor populated its fields and then replaced the form with a clone. The clone reset the provider, approval mode and cadence selects, so saving could submit different values from the selected configuration. Form cloning and listener wiring now happen before population, preserving all existing controls and defaults.

Closes #246.

Independent adversarial gpt-6-astra review approved exact commit 10d516e93ef9fecfc9bfdb1630d57c144068597b with no actionable findings, under the owner's authorized local-review alternative. The reviewer reread the complete three-file committed diff and verified committed ladder source against the production bundle's embedded source map.

Independent checks passed 10 focused Jest tests and fresh production-browser desktop and phone scenarios. They exercise the real Edit, Save, reopen, Cancel, Close and Add flows, preserved selections and locked edit keys, exact outgoing PUT payloads, changed coverage, reset defaults, alternate providers, navigation and error observation. Both the original source and independently rerun old-order mutation reproduced the select reset. Final source, bundle and committed-SHA checks matched; typecheck, lint, production build and normal commit hooks passed.

Browser evidence uses synthetic HTTP responses at the API boundary and the actual production frontend. It proves visible state and submitted payloads, not live cloud or PostgreSQL persistence. The current backend rejects an account/provider mismatch, so this PR does not claim that the historical Azure example always creates a wrong AWS database row. AWS approval-mode and cadence corruption still reproduced. No purchase, cloud operation or deployment was used for verification.

Clone the form before populating its controls so editing retains the
provider, approval mode and cadence in the submitted configuration.

Cover the Edit and submit path in Jest and the production browser,
including repeated opens, defaults, Cancel/Close and mobile behavior.
@cristim cristim added severity/medium Moderate harm urgency/this-sprint Within the current sprint triaged Item has been triaged priority/p1 Next up; this sprint impact/many Affects most users effort/xs Trivial / one-liner type/bug Defect labels Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 3 billable files and costs up to $0.75.

  • 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 24 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 74 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: 71157ea1-7926-4c34-a170-039eb9b5d592

📥 Commits

Reviewing files that changed from the base of the PR and between 6d9a70f and 10d516e.

📒 Files selected for processing (3)
  • frontend/src/__tests__/ladder.test.ts
  • frontend/src/ladder.ts
  • frontend/tests-e2e/ladder-config.spec.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/xs Trivial / one-liner impact/many Affects most users priority/p1 Next up; this sprint severity/medium Moderate harm triaged Item has been triaged type/bug Defect urgency/this-sprint Within the current sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(frontend): cloning the ladder form after populating it resets its three select fields

1 participant