Skip to content

Sidebar monitors: always render an element in the auto-rerunning fragments - #415

Merged
t0mdavid-m merged 5 commits into
mainfrom
claude/project-thread-rgd897
Oct 28, 2026
Merged

t0mdavid-m merged 5 commits into
mainfrom
claude/project-thread-rgd897

Conversation

@t0mdavid-m

@t0mdavid-m t0mdavid-m commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Requested by Tom · project thread

Problem

In a FLASHApp docker-compose deployment, Firefox sometimes goes to a white page after a page switch, here Quickstart → Identification. The browser console shows Error: Bad 'setIn' index 2 (should be between [0, 0]) from addBlock/applyDelta.

monitor_queue() and monitor_storage() are @st.fragment(run_every=5) functions that return without rendering anything when there is no queue or no storage heartbeat. That is the case in local mode and in docker-compose. A run_every fragment that renders no element is the suspected cause: a later fragment delta targets a block the browser no longer has.

Change

  • New _keep_fragment_non_empty() renders st.empty() at the start of both fragments, so each run has one element.
  • What the sidebar shows does not change.

Status

This is a precaution, not a confirmed fix. I could not reproduce the crash in Chromium: about 210 navigations, idle, with a workflow running, and with the click timed against the fragments' 5 s tick. Firefox is not available in the environment where I tested.

Tests

tests/ (228) and test_gui.py (30) pass.

The branch also contains a -s ours merge of its already squash-merged history (#414). That merge changes no content.


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Queue and storage monitoring views now retain a consistent empty display when there are no metrics or status to show, including cases where monitoring returns early. Existing monitoring information and behavior remain unchanged when metrics or status are available. This keeps the monitoring area present even when it has nothing to display.

… ':'

A pattern such as "fd:" now selects every parameter under that top-level
section, so a workflow can hide a subsection that does not apply to it
without listing each parameter. Plain names keep their suffix matching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz
preset_buttons() renders before configure(). Calling st.rerun() from the
button branch interrupted the script before any configure widget was
reached, and Streamlit drops the widget state of widgets a run does not
reach while keeping their keys. The widgets then re-rendered empty: a
file selected before clicking a preset was lost and the next start
failed with 'Select at least one mzML file'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz
…ments

monitor_queue and monitor_storage return without rendering anything when
there is no queue or no storage heartbeat (local, docker-compose). A
run_every fragment that renders nothing is the suspected cause of a
Firefox white page after a page switch ('Bad setIn index' in the
frontend). An empty placeholder keeps the fragment's block present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz
@t0mdavid-m t0mdavid-m self-assigned this Oct 28, 2026
t0mdavid-m pushed a commit to OpenMS/FLASHApp that referenced this pull request Oct 28, 2026
…ments

Port of OpenMS/streamlit-template#415, a precaution against the Firefox
white page ('Bad setIn index') after switching pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 65bb6547-35ea-444e-a63e-fdbc8316a3ae
Commits

Reviewing files that changed from the base of the PR and between 604ecd8 and 7b64a21.

Files selected for processing: 1
  • src/common/common.py

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

Walkthrough

Added a helper that renders an empty placeholder. monitor_queue() and monitor_storage() call it before their existing monitoring logic.

Changes: Monitor fragment rendering

Layer / File(s) Summary
Placeholder rendering
src/common/common.py
Added _keep_fragment_non_empty() and called it before the existing logic in monitor_queue() and monitor_storage().

Priority: Low

Change: Bug fix

Merge Risk: Minimal · up to 7b64a

The change is limited to keeping monitor fragments non-empty and does not introduce an actionable merge risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the sidebar monitor fragments (monitor_queue and monitor_storage) now always render an element. It matches the raw summary, which describes _keep_fragment_non_empty() …
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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 names the main change: the sidebar monitor fragments (monitor_queue and monitor_storage) now always render an element. It matches the raw summary, which describes _keep_fragment_non_empty() being called before the existing monitoring logic. The title is specific and short. The PR objectives also mention commit messages about trailing-colon parameter patterns and preset handling. Those are secondary and do not contradict the title, since the title covers the primary change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. 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 2 functions across 1 files.

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

A rabbit saw a fragment bare
And placed a placeholder there
Queue checks run, then storage too
Their prior paths still follow through
The rabbit hops away with cheer

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

Copy link
Copy Markdown
Member Author

test-traefik (simple, amd64) failed in the NFS workspace-volume checks: mkdir: cannot stat '/workspaces-streamlit-template/.ci-cross-node-…': Remote I/O error, and the seed-demos init containers hit the same error. #414 failed the same way. This PR only adds an st.empty() placeholder to the two sidebar monitor fragments in src/common/common.py, which the kind/NFS storage path never touches. I don't have a fix for the NFS flake to port here, so I'm re-running the failed jobs once.


Generated by Claude Code

@t0mdavid-m
t0mdavid-m merged commit ca9666b into main Oct 28, 2026
24 of 26 checks passed
t0mdavid-m added a commit to OpenMS/FLASHApp that referenced this pull request Oct 29, 2026
…sate/Native presets (#104)

* input_TOPP: exclude/include a whole parameter section with a trailing ':' (#413)

A pattern such as "fd:" now selects every parameter under that top-level
section, so a workflow can hide a subsection that does not apply to it
without listing each parameter. Plain names keep their suffix matching.

Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit bf361e5)

* FLASHTnT: FLASHAnnotator step and current FLASHTnT/FLASHDeconv

Pipeline (TagWorkflow): DecoyDatabase (skipped when the FASTA already has
decoys or is PEFF) -> FLASHDeconv -> FLASHTnT (-db, -in_raw) ->
FLASHAnnotator on the proteoform file. Every TOPP step is gated on success.

- configure(): FLASHAnnotator tab; FLASHTnT's fd: section excluded (the
  FLASHDeconv tab already covers it); FLASHTnT ion types passed on to
  FLASHAnnotator.
- New src/parse/annotator.py: FLASHAnnotator fragments (terminal and
  internal) in database coordinates, plus per-proteoform summary; stored
  as annotated_fragments / annotation_summary in sequence data.
- Manual upload accepts the FLASHAnnotator outputs.
- New example datasets (8 E. coli top-down spectra) replace the AqpZ demo.
- Docker: build OpenMS from FDmerge.
- polars pinned <2 (2.0 removed with_row_count); with_row_index used.
- Vue bundle rebuilt with the sequence-view internal-ion visualization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* FLASHTnT: Lysate/Native presets, declare FLASHTnT flags, version 1.1.0

- presets.json: "Lysate" and "Native" for the FLASHTnT workflow (FLASHTnT
  -native off/on).
- FLASHTnT and FLASHAnnotator bool parameters are valueless flags; they are
  now declared as flag_parameters. Without it, switching one on passed
  "-native true", which FLASHTnT aborts on.
- Version 1.0.1 -> 1.1.0 (settings.json, Windows build name).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* docker: pin autowrap 0.23.0 for FDmerge's pyOpenMS

FDmerge's create_cpp_extension.py still passes include_boost, which
autowrap 0.24 removed ("generate_code() got an unexpected keyword argument
'include_boost'" in make pyopenms). 0.23.0 is the version FDmerge's own
requirements history pins and what this Dockerfile used before the 0.24
bump; the Cython < 3.3 cap still applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Apply parameter presets in the button callback instead of st.rerun()

Port of OpenMS/streamlit-template#414. Clicking a preset after selecting
input files dropped the file selection, so the next start failed with
'Select at least one mzML file'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Docker: build the Vue component from vue-component PR #32 until it lands in FVdeploy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* FLASHTnT: restore tag coverage when unmatched tags make ProteoformIndex float

The current FLASHTnT leaves ProteoformIndex empty for tags that match no
proteoform, so pandas reads the column as float and a matched tag's index
arrives as '0.0'. _split_ints dropped those tokens, the tag-space to
protein-space map came out empty, and every proteoform got zero tag
coverage: the sequence view lost its tag shading and coverage scale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Sidebar monitors: always render an element in the auto-rerunning fragments

Port of OpenMS/streamlit-template#415, a precaution against the Firefox
white page ('Bad setIn index') after switching pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Rebuild JS bundle: 'internal fragments' in the sequence view fragment table

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* FLASHTnT presets: Native uses the 10x decoy database, Lysate the 1x one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Quickstart: What's new in 1.1.0 panel below the workflow buttons

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Rebuild JS bundle: drop viewer selections sent after a page switch

Fixes the white page and the lost navigation when another page is clicked
while the viewer is loading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Workspace selector: don't crash when its callback fires without a value

Port of OpenMS/streamlit-template#416. A page switch while a page was
loading replayed the selectbox value before its key was mapped again and
change_workspace raised KeyError: 'chosen-workspace'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Quickstart: clearer What's new line for FLASHAnnotator

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Workspace selector: compare full workspace names; keep test workspaces in tmp_path

Port of the follow-up on OpenMS/streamlit-template#416.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

* Build the Vue component from FVdeploy again

The page-switch fix is merged there (openms-streamlit-vue-component#32).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P4MTpJCZMdSHNRFixkxcnz

---------

Co-authored-by: Claude <noreply@anthropic.com>
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