Skip to content

Fix FLASHDeconv Sequence View ions not updating on scan change#94

Merged
t0mdavid-m merged 1 commit into
developfrom
fix/seqview-scan-reactivity
Jun 24, 2026
Merged

Fix FLASHDeconv Sequence View ions not updating on scan change#94
t0mdavid-m merged 1 commit into
developfrom
fix/seqview-scan-reactivity

Conversation

@t0mdavid-m

@t0mdavid-m t0mdavid-m commented Jun 24, 2026

Copy link
Copy Markdown
Member

Problem

In the FLASHDeconv Viewer's Sequence View, fragment-ion markers (a/b/c/x/y/z) never appear — even after selecting an MS2 scan. FLASHTnT works.

Root cause (Vue reactivity freeze)

prepareFragmentTable() (the only ion-marker producer) runs only from watchers. FLASHDeconv always slices per_scan_data to one row, which pins the selectedScanIndex computed at 0, so it never changes on a scan switch and its watcher never fires; there was no per_scan_data watcher. The match was computed once and frozen. FLASHTnT was unaffected because protein selection changes the proteinIndex-keyed sequence computed.

Change

Vue source fix is in t0mdavid-m/openms-streamlit-vue-component#29 (→ FVdeploy); this PR carries the rebuilt bundle + the submodule pointer bump:

  • js-component/dist/ rebuilt from the fixed source (built via Docker from local submodule source — verified the bundle contains only the intended deltas).
  • Submodule pointer 57c9f6f → d98f15a.
  • CLAUDE.md: document that the Vue bundle must always be built via Docker (not a local Node toolchain), with the local-source recipe.

Watcher set rationalized for the only two consumers (FLASHTnT, FLASHDeconv): add a shallow per_scan_data watcher → recomputeFragments(); drop the dead selectedScanIndex and debug fontSize watchers; extract the shared recompute into a helper.

Merge order

Depends on the submodule PR. After #29 merges into FVdeploy, update this submodule pointer to the merged commit so the full Docker image build (which clones FVdeploy) and the committed bundle stay in sync.

Verification

  • Rebuilt bundle token audit matches exactly (per_scan_data watcher +1, recomputeFragments ×6, fontSize debug log removed, prepareFragmentTable 8→4).
  • Manual: open FLASHDeconv Viewer with a saved sequence, select MS2 scans → ion markers + "Matching fragments (# N)" update per scan; FLASHTnT Sequence View unaffected.

🤖 Generated with Claude Code

https://claude.ai/code/session_016Z9gnbqpmuU9z6BmoaXmuY

Summary by CodeRabbit

  • Documentation

    • Reworked the project guide to reflect FLASHApp-specific setup, local development, testing, Docker usage, deployment, and runtime behavior.
    • Added clearer guidance on app workflow, caching, UI wiring, and operational requirements.
  • Chores

    • Updated the bundled Vue component reference to a newer version.

Rebuild js-component/dist from the fixed Vue source (submodule
fix/seqview-scan-reactivity @ d98f15a) so the Sequence View recomputes
fragment ions when the selected scan changes. Root cause was a Vue
reactivity freeze in SequenceView (selectedScanIndex computed pinned at 0
for the single-row FLASHDeconv per_scan_data, and no per_scan_data
watcher), detailed in the submodule PR.

Bundle rebuilt via Docker from local submodule source. Also document in
CLAUDE.md that the Vue bundle must always be built via Docker (with the
local-source recipe), not a local Node toolchain.

Submodule pointer bumped 57c9f6f -> d98f15a (depends on the submodule PR
into FVdeploy; update to the merged commit once it lands).

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

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

CLAUDE.md is fully rewritten, replacing generic OpenMS/Streamlit template documentation with FLASHApp-specific instructions covering local execution, Docker builds, Vue component prerequisites, the FLASHApp data pipeline and Layout Manager architecture, workspace caching, CI workflow descriptions, and FLASHApp-specific conventions. The openms-streamlit-vue-component submodule pointer is bumped to a new commit.

Changes

FLASHApp documentation and submodule update

Layer / File(s) Summary
CLAUDE.md rewrite for FLASHApp
CLAUDE.md
Entire file replaced: generic template overview removed; FLASHApp-specific run/test/lint/Docker commands, Vue component build order, data pipeline and Layout Manager architecture, workspace/FileManager caching model, parameter handling, deployment/runtime setup (Redis/RQ/Streamlit/nginx), CI workflow descriptions, and FLASHApp-specific conventions added.
Submodule bump
openms-streamlit-vue-component
Subproject commit hash advanced to a new revision (d98f15a3...).

Poem

A blank slate was cleared with a hop and a bound,
The old template words are no longer around.
FLASHApp now speaks in the docs crystal-clear,
With pipelines and caches and Docker brought near.
🐇✨ The submodule skipped forward one tidy new step!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main user-facing fix: fragment ions in FLASHDeconv Sequence View now update on scan change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/seqview-scan-reactivity

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CLAUDE.md`:
- Line 30: The Docker build example currently shows a raw GitHub token being
pasted directly into the command, which should be replaced with an
environment-variable based example. Update the documented command in CLAUDE.md
to reference GITHUB_TOKEN via an existing shell variable (for example, in the
Docker build invocation) so the guidance points users to export the token first
and pass it through the build arg without exposing the secret.
- Line 35: Clarify the Python 3.11 note in CLAUDE.md so it is explicitly scoped
to Docker/runtime rather than implying all tooling or CI uses 3.11. Update the
wording around the Python pin and GITHUB_TOKEN requirement to reflect that CI
linting may still use a different version, and reference the surrounding
environment/setup guidance in CLAUDE.md so contributors do not assume parity
with the pylint workflow.
- Line 68: The fenced code block opened in CLAUDE.md is missing a language
identifier, which triggers markdownlint MD040. Update the opening fence to
include a language hint such as text, and keep the rest of the fenced block
unchanged so the documentation stays lint-clean.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e7348652-82b2-4116-acde-ad2700ceb848

📥 Commits

Reviewing files that changed from the base of the PR and between a89427d and b41f2f6.

⛔ Files ignored due to path filters (3)
  • js-component/dist/assets/index-801f5ae0.css is excluded by !**/dist/**
  • js-component/dist/assets/index-ac66dd94.js is excluded by !**/dist/**
  • js-component/dist/index.html is excluded by !**/dist/**
📒 Files selected for processing (2)
  • CLAUDE.md
  • openms-streamlit-vue-component

Comment thread CLAUDE.md
st.number_input("X", value=params["my-param"], key="my-param")
save_params(params)
# Docker (full image with OpenMS + TOPP tools + Vue build)
docker build -f Dockerfile --no-cache -t flashapp:latest --build-arg GITHUB_TOKEN=<gh-token> .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Avoid documenting raw token pasting in shell commands.

Line 30 currently suggests placing a token directly on the command line, which risks credential leakage via shell history/process lists. Prefer env-var based usage in the example (for example, --build-arg GITHUB_TOKEN="$GITHUB_TOKEN" after exporting it).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLAUDE.md` at line 30, The Docker build example currently shows a raw GitHub
token being pasted directly into the command, which should be replaced with an
environment-variable based example. Update the documented command in CLAUDE.md
to reference GITHUB_TOKEN via an existing shell variable (for example, in the
Docker build invocation) so the guidance points users to export the token first
and pass it through the build arg without exposing the secret.

Comment thread CLAUDE.md
- `results()` — display outputs

Each workflow gets 4 content pages (upload, configure, run, results) that call `wf.show_*_section()`.
Python is pinned to **3.11** (matches the Docker runtime). `GITHUB_TOKEN` is required at build time to fetch the private `openms-streamlit-vue-component` submodule and OpenMS resources.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Clarify Python version scope (runtime vs CI).

Line 35 states Python is pinned to 3.11, but CI lint workflow uses Python 3.10 (.github/workflows/pylint.yml, Line 15). Please clarify this is Docker/runtime pinning so contributors don’t assume CI/tooling parity.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLAUDE.md` at line 35, Clarify the Python 3.11 note in CLAUDE.md so it is
explicitly scoped to Docker/runtime rather than implying all tooling or CI uses
3.11. Update the wording around the Python pin and GITHUB_TOKEN requirement to
reflect that CI linting may still use a different version, and reference the
surrounding environment/setup guidance in CLAUDE.md so contributors do not
assume parity with the pylint workflow.

Comment thread CLAUDE.md
{"key": "my-param", "value": 5, "name": "My Parameter", "help": "Description",
"min": 1, "max": 100, "step_size": 1, "widget_type": "slider"},
]
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a language identifier to the fenced code block.

Line 68 opens a fenced block without a language, which triggers markdownlint MD040. Use a language hint (for example, text) to keep docs lint-clean.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 68-68: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLAUDE.md` at line 68, The fenced code block opened in CLAUDE.md is missing a
language identifier, which triggers markdownlint MD040. Update the opening fence
to include a language hint such as text, and keep the rest of the fenced block
unchanged so the documentation stays lint-clean.

Source: Linters/SAST tools

@t0mdavid-m t0mdavid-m merged commit 1bbf6ac into develop Jun 24, 2026
14 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.

1 participant