Skip to content

fix(upstream): integrate compatible fixes and catalog tooling - #2

Merged
Niketion merged 7 commits into
developfrom
integrate/upstream-2026-11-03
Nov 3, 2026
Merged

Niketion merged 7 commits into
developfrom
integrate/upstream-2026-11-03

Conversation

@Niketion

@Niketion Niketion commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Description

Selectively integrate compatible changes from flowsurface-rs/flowsurface through 50c06caac0cf7ce9c3bcaabcf99fbd4e4e0f6746 (fetched November 3, 2026). Flowdepth previously reviewed upstream through ee32572 and retains its own chart architecture.

  • Upgrade WebSocket TLS and HTTPS proxy handling; update rustls, rustls-webpki, quinn-proto and bundled roots while preserving fork dependencies and connection recovery.
  • Keep stream subscription identity stable when panels are reordered or duplicate consumers disappear.
  • Reduce heatmap wheel sensitivity and normalize horizontal axis drag zoom by viewport width.
  • Add the indicator CLI catalog command with deterministic metadata, relative paths and SHA-256 checksums.
  • Show drawing mode and selection through the chart cursor, adapted to Flowdepth's drawing state.

Attribution and integration decisions

Each imported commit retains upstream author akenshaw akenshaw@pm.me and original author date, with its full source SHA in an Upstream-Commit trailer. Commit titles follow Flowdepth conventions; the committer records integration. Existing project lineage, licenses, branding and ownership are preserved. This is a selective port, not a declaration that upstream history is fully merged.

Upstream commit Decision
82e3cf5 Import heatmap zoom adjustments.
0f870dc Import TLS changes; resolve the lockfile against Flowdepth dependencies. Bundled roots resolve to compatible 1.0.11 rather than upstream's 1.0.10; unrelated package versions remain unchanged. Cargo also normalizes several Windows dependency edges to the existing windows-sys 0.61.2.
4b7e95e Defer spread/depth panels: requires the rewritten pane/content architecture and GPU indicator layout; a direct replacement would remove fork heatmap extensions.
6ce58af Defer shared chart helpers: coupled to the rewritten composition, viewport, studies and indicator panels.
27024dc Defer volume antialiasing: shader coverage and rectangle layouts depend on the preceding GPU indicator pipeline; needs a dedicated port and GPU validation.
4e3b93f Import catalog generation CLI and documentation.
0e6d71e Defer chart presets: depends on new chart composition, pane state and layout serialization.
005cade Port cursor behavior to the retained drawing implementation.
3561056 Import deterministic stream ordering.
c276161 Defer event cleanup: Flowdepth routes fetched data using a layout UUID and keeps background layout/recovery handling in the application. Upstream's direct dispatch cannot replace that path unchanged.
7a56fb2 Defer online catalog browser: depends on rewritten pane state, layouts and indicator installation. Retain Flowdepth's integrated browser and vendored catalog.
50c06ca Keep independent Flowdepth README and package version; this upstream release metadata change adds no compatible runtime fix.

Older previously reviewed changes (multi-ticker Time & Sales, packaging, Windows multi-window policy and chart rewrite) remain outside this integration.

Motivation

Bring upstream fixes and compatible tooling into Flowdepth while preserving its order-flow extensions, options analytics, saved layouts and attribution. Reordering panels should not cause redundant market stream reconnections.

Type of change

  • Bug fix
  • Feature
  • Documentation
  • Refactor or maintenance

Checks performed

Passed on Windows using pinned Rust 1.95.0 and RUSTFLAGS="-D warnings" against final commit 3ad5733:

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets --all-features --locked
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo test --workspace --all-targets --all-features --locked — 421 passed, 0 failed, 11 ignored by the suite.
  • cargo run --locked -p flowsurface-indicator-engine --bin flowsurface-indicator -- test data/indicators/sources --namespace core — 9 sources passed.
  • cargo run --locked -p flowsurface-indicator-engine --bin flowsurface-indicator -- test indicators/sources --namespace catalog — 27 sources passed.
  • git diff --check origin/develop
  • Relevant manual testing described below

Also compared author name, email and original author date for all five imported commits against their source commits; all match. Linux/macOS validation is left to CI.

Regression tests cover subscription ordering across exchanges, reversed pane order and duplicate consumers, plus catalog ordering, repeatable bytes, source hashes, output preservation on validation failure and source overwrite protection.

Review follow-up: reproduced Codex finding discussion_r4458244154 on Windows with alpha.IND overwriting the temporary alpha.ind fixture before the fix. Commit 3ad5733 rejects all eight ASCII case variants of .ind, with regression coverage confirming the source remains unchanged. It also replaces the to_str closure with a method reference, addressing Sonar issue AaGiddinsY6qkvQcIrfs. The complete quality gate above was rerun successfully after the fix.

Manual testing notes: Desktop GUI and live exchange/proxy connections were not exercised.

UI evidence

No screenshots: the GUI was not launched. Visible changes are cursor feedback and axis zoom sensitivity.

AI assistance

AI assistance: Codex reviewed upstream changes, resolved the lockfile conflict, adapted drawing cursor behavior, added regression tests, fixed mixed-case source overwrite protection after review and prepared the integration commits and PR. The imported implementations retain original upstream authorship.

Compatibility and data impact

No saved-layout or market-cache schema changes. Existing quantity preferences, indicators and recovery behavior remain intact. The new catalog command explicitly writes a requested JSON file and does not install indicators or contact an online catalog. TLS trust roots and certificate validation change with the dependency upgrade; no live exchange or HTTPS proxy connection was tested.

akenshaw and others added 6 commits November 3, 2026 18:14
Upgrade certificate verification, bundled roots and the WebSocket TLS stack. Preserve Flowdepth dependencies and reconnect handling while adapting HTTPS proxy connections.

Upstream-Commit: 0f870dc06091e56fb100700f85115a24c5466414
Upstream-Commit: 82e3cf5186d8fdd56f745a118e379853be07b16e
Upstream-Commit: 35610562c9b9c6242b654f814125c58818840105
Upstream-Commit: 4e3b93fef8a49b060260e540740e2e97fa526021
Adapt the upstream cursor behavior to Flowdepth drawing state.

Upstream-Commit: 005caded90256fe38b8185cde5d3c537b401a0bd
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8e1afc67-ee67-49be-8812-1e8d9b260b83
Commits

Reviewing files that changed from the base of the PR and between 63e7a45 and 3ad5733.

Files selected for processing: 1
  • indicator-engine/src/bin/flowsurface-indicator.rs

No actionable comments were generated in the recent review.

Walkthrough

The changes update exchange stream ordering and TLS setup, add indicator catalog generation to the CLI, and adjust Kline chart cursor selection and heatmap zoom behavior.

Changes: Exchange updates

Layer / File(s) Summary
Stable stream specification ordering
exchange/src/lib.rs, exchange/src/unit.rs, exchange/src/adapter.rs
Ordering traits are added to stream-related types. UniqueStreams::streams sorts its results, and tests cover input order, duplicates, and exchange filters.
Rustls dependency and connection updates
exchange/Cargo.toml, exchange/src/adapter/ws.rs, exchange/src/adapter/proxy.rs
Rustls and WebPKI dependencies are updated. WebSocket and HTTPS proxy TLS setup use owned server names; WebSocket root certificates are loaded from cloned WebPKI roots.

Indicator catalog generation

Layer / File(s) Summary
Catalog entry data
indicator-engine/Cargo.toml, indicator-engine/src/bin/flowsurface-indicator.rs
Compiled sources retain their source text. Catalog entries include source metadata, root-relative paths, hashes, byte sizes, and supported bases.
Catalog command and output
indicator-engine/src/bin/flowsurface-indicator.rs, indicator-engine/README.md
The CLI parses catalog options, validates and sorts sources, and writes JSON using a temporary file. Tests cover output and failure cases; the README documents the command.

Chart interaction updates

Layer / File(s) Summary
Kline drawing cursor selection
src/chart/kline.rs
Cursor selection over the chart now reflects the active drawing tool and selection state.
Heatmap axis zoom
src/widget/chart/heatmap/ui.rs, src/widget/chart/heatmap/ui/axisx.rs, src/widget/chart/heatmap/ui/axisy.rs
Wheel zoom uses a shared scaling helper. X-axis drag zoom uses exponential scaling, and Y-axis drag sensitivity is reduced.

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant command_catalog
  participant CompiledSource
  participant write_catalog
  participant CatalogFile
  CLI->>command_catalog: Dispatch catalog command
  command_catalog->>CompiledSource: Validate sources and build catalog entries
  command_catalog->>write_catalog: Pass serialized JSON and output path
  write_catalog->>CatalogFile: Write temporary file and rename into place
Loading

Suggested reviewers: akenshaw

Merge Risk: Minimal · previous review 63e7a

No identified issue prevents merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… 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 uses the conventional commit format and names the upstream integration, but it is vague about the main change. The changeset covers WebSocket TLS and proxy upgrades, stream ordering, heatmap…
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: Title check

Explanation

The title uses the conventional commit format and names the upstream integration, but it is vague about the main change. The changeset covers WebSocket TLS and proxy upgrades, stream ordering, heatmap zoom, an indicator catalog CLI, and cursor feedback. The title names only the 'upstream' source and 'catalog tooling', so it is partially related. It does not state the primary change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 15 functions across 10 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
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

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

CodeRabbit Verify

  • CodeRabbit Verify could not start. Follow the reply for details, then check again.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 496de86a-4744-416c-8f7b-4e1daf33276b
Commits

Reviewing files that changed from the base of the PR and between 973585f and 63e7a45.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 13
  • exchange/Cargo.toml
  • exchange/src/adapter.rs
  • exchange/src/adapter/proxy.rs
  • exchange/src/adapter/ws.rs
  • exchange/src/lib.rs
  • exchange/src/unit.rs
  • indicator-engine/Cargo.toml
  • indicator-engine/README.md
  • indicator-engine/src/bin/flowsurface-indicator.rs
  • src/chart/kline.rs
  • src/widget/chart/heatmap/ui.rs
  • src/widget/chart/heatmap/ui/axisx.rs
  • src/widget/chart/heatmap/ui/axisy.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T17:30:57.513504Z 63e7a45 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 63e7a4599d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Niketion Niketion self-assigned this Nov 3, 2026
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

CodeRabbit Verify cannot start because this repository is not enabled for PR Verify. Enable PR testing in Verify settings.

CodeRabbit Verify can be triggered again using the @coderabbitai verify command.

@Niketion

Niketion commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Action performed

Full review finished.

@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@Niketion
Niketion merged commit 931e6bd into develop Nov 3, 2026
6 checks passed
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.

2 participants