Add cash-flow forecast report#46
Open
andrewzolotukhin wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original request
Implement the planned cash-flow forecast feature, then persist forecasts daily and add a UI force-regenerate control.
What changed
cash_flow_forecastspersistence keyed by user, local forecast date, forecast version, and input hash.GET /api/stats/cash-flow-forecastto read the persisted daily forecast, return deterministic pending data when missing/stale, and enqueue background generation instead of blocking on OpenAI.POST /api/stats/cash-flow-forecast/jobsfor forced regeneration.Validation
npm run lintnpm run typechecknpm test(71 files, 379 tests; rerun outside sandbox because runtime server tests bind127.0.0.1)GitHub checks
Lint and test: successDeploy PR environment: successPlaywright e2e: successPreview QA
Preview URL: https://xpenser-pr-046.cleverbrush.com
Passed browser QA on the deployed preview:
/stats/forecast.Notes
The preview proxy only forwards the existing scan WebSocket path today, so the forecast UI uses normal authenticated polling of the persisted forecast after starting a job. The API progress endpoint still exists for clients/environments that can connect to the WebSocket subscription path.