Skip to content

Fix/transient solver max steps#10

Open
mahek395 wants to merge 2 commits intoOpenLake:mainfrom
mahek395:fix/transient-solver-max-steps
Open

Fix/transient solver max steps#10
mahek395 wants to merge 2 commits intoOpenLake:mainfrom
mahek395:fix/transient-solver-max-steps

Conversation

@mahek395
Copy link
Copy Markdown

@mahek395 mahek395 commented Apr 8, 2026

Problem
TransientSolver.solve() had no iteration cap — small timeStep + large endTime combinations could run millions of matrix solves, blocking the UI thread and exhausting memory.
Fix
Added a MAX_STEPS = 100_000 hard cap. When exceeded, solve() returns { success: false, error, steps } instead of hanging.
Note
TransientSolver.js was not present in the repo. Created it at lib/TransientSolver.js with the guard included from the start.
Closes #1

mahek395 added 2 commits April 8, 2026 17:14
…nLake#2)

- Replace local timeout variables with useRef
- Clear pending timeouts in useEffect cleanup
- Prevents state update on unmounted component warning

Closes OpenLake#2
Prevents the solver from running indefinitely on small timeStep /
large endTime combinations. Returns { success: false, error } when
the cap is hit so the UI can surface a descriptive message.

Closes OpenLake#1
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

@mahek395 is attempting to deploy a commit to the OpenLake_Website Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

Warning

Rate limit exceeded

@mahek395 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 20 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 7 minutes and 20 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5bd3eef8-1116-41b8-9f64-3861694c4c02

📥 Commits

Reviewing files that changed from the base of the PR and between cd31052 and d7fec04.

📒 Files selected for processing (4)
  • app/history/page.js
  • app/observations/page.js
  • app/starred/page.js
  • lib/TransientSolver.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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.

Login/signup form does not respond to Enter key (no onSubmit handler)

1 participant