fix(barchart): add CSRF retry and mostActive fallback to flow#51
Merged
jackwener merged 1 commit intojackwener:mainfrom Mar 18, 2026
Merged
fix(barchart): add CSRF retry and mostActive fallback to flow#51jackwener merged 1 commit intojackwener:mainfrom
jackwener merged 1 commit intojackwener:mainfrom
Conversation
The flow command returned no data because: 1. The CSRF token may not be in the DOM yet when Angular is still initializing — add a polling loop (up to 5s) to wait for it 2. The unusual_activity list is empty outside market hours — fall back to the mostActive list which always has data 3. Remove the DOM table fallback that never matched (barchart uses Angular components, not standard <tr> elements)
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.
Summary
Fixes
opencli barchart flowreturning no data by addressing two root causes:<meta name="csrf-token">tag when the evaluate runs. Added a polling loop (up to 5s) to wait for it, with a clear error message if it never appears.options.unusual_activity.stocks.uslist is empty outside market hours. Addedoptions.mostActive.usas a fallback which always has data.<tr>DOM parser never matched anything because barchart uses Angular components, not standard table elements.Test plan
npm run buildpassesopencli barchart flow --limit 5returns data (via mostActive fallback after hours)opencli barchart flow --type call --limit 5correctly filters to calls onlyopencli barchart flow --type put --limit 5correctly filters to puts only