Skip to content

Conversation

@t0mdavid-m
Copy link
Member

@t0mdavid-m t0mdavid-m commented Oct 3, 2025

Shares files between TnT and Deconv. Also allows users to rename files.

Summary by CodeRabbit

  • New Features

    • Inline rename and per-row edit mode for experiments.
    • Display names shown across tables and dropdowns; ZIP downloads use display names.
    • Per-row delete action and a “Prepare Download” step for packaging files.
  • Refactor

    • Viewers now use display-name-based selections instead of internal IDs.
    • Simplified cache path to workspace-level cache.
    • Trimmed FLASHTnT downloadable targets to key outputs.
  • Chores

    • Removed large demo datasets and legacy configuration files from example workspaces.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

UI in FLASHDeconv and FLASHTnT adds per-row rename/edit, moves to workspace-level cache paths, and switches dropdowns to display-name mappings. Download ZIP creation now excludes archives and uses display names. FileManager gains helpers for listing, display names, renaming, existence checks, and storage. Large example-data configurations and generated files are removed.

Changes

Cohort / File(s) Summary
Workflow FileManager API
src/workflow/FileManager.py
Added methods: get_all_files_except, get_display_name, rename_dataset, result_exists, store_file; constructor now uses workspace-level cache path.
FLASHDeconv UI: downloads, viewer, inputs
content/FLASHDeconv/FLASHDeconvDownload.py, content/FLASHDeconv/FLASHDeconvViewer.py, content/FLASHDeconv/FLASHDeconvSequenceInput.py
Moved cache to workspace/cache; download table restructured with Name and delete column; per-row edit/rename with validation; ZIP uses get_all_files_except and display name; viewer switches to display-name mappings and uses threedim_SN_plot as results source.
FLASHTnT UI: downloads, viewer
content/FLASHTnT/FLASHTnTDownload.py, content/FLASHTnT/FLASHTnTViewer.py
Moved cache to workspace/cache; trimmed downloadable targets; added per-row edit/rename with validation; two-phase prepare+download ZIP via get_all_files_except; delete action per row; viewer adopts display-name mappings and internal_fragment_data source.
Example data cleanup — FLASHDeconv artifacts
example-data/.../flashdeconv/...
Removed ini/params JSONs and multiple generated artifacts (e.g., out_deconv.mzML, toppic_*.feature/msalign, FD_parameters.json) across demo_antibody, demo_aqpz, workshop.
Example data cleanup — FLASHTnT artifacts
example-data/.../flashtnt/...
Removed ini/params JSONs and generated files (FTnT_parameters.json, FD_parameters.json, out_deconv.mzML, toppic_*.feature/msalign) across demo_antibody, demo_aqpz, workshop.
Example workspaces root params
example-data/workspaces/*/params.json
Deleted workspace-level params.json files in demo_antibody and demo_aqpz.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant UI as Download Page
  participant FM as FileManager
  Note over UI: Per-row edit
  U->>UI: Click "Edit"
  UI->>UI: Toggle edit_mode[experiment]=True
  U->>UI: Enter new_name + Save
  UI->>UI: Validate (non-empty, <=100 chars)
  UI->>FM: rename_dataset(experiment, new_name)
  FM-->>UI: success/failure
  UI->>UI: Exit edit_mode, rerun on success
Loading
sequenceDiagram
  autonumber
  actor U as User
  participant UI as Download Page
  participant FM as FileManager
  Note over UI: Prepare ZIP using display name
  U->>UI: Click "Prepare Download"
  UI->>FM: get_display_name(experiment)
  FM-->>UI: current_name
  UI->>FM: get_all_files_except(experiment, ['download_archive'])
  FM-->>UI: files (paths)
  UI->>FM: store_file(experiment,'download_archive', zip_stream, current_name+".zip")
  FM-->>UI: stored
  UI-->>U: Download button: current_name.zip
Loading
sequenceDiagram
  autonumber
  actor U as User
  participant V as Viewer (Deconv/FTnT)
  participant FM as FileManager
  V->>FM: get_results_list([...])
  FM-->>V: experiments (IDs)
  V->>FM: get_display_name(id) * N
  FM-->>V: display_names
  U->>V: Select display name
  V->>V: Map to id via display_name_to_id
  V->>V: Validate index via display_name_to_index
  Note over V: Use id for downstream rendering
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • New Features #50 — Both touch FileManager APIs and result retrieval patterns; related to storage/backends and listing methods.
  • Add Demo Mode #21 — Overlaps in FLASHDeconv UI modules and cache path changes; similar adoption of workspace-level cache and data sourcing.

Poem

A rabbit taps keys with cautious grace,
Renames in rows, finds each dataset’s face.
Zips now zip with cleaner names,
Viewers map IDs to friendly frames.
Cache hops up a level—neat!
Demo crumbs swept—tidy feat.
Thump-thump: release is sweet. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title “Share Files” is overly generic and does not specify what files are shared or the context (e.g., between TnT and Deconv) nor mention the new rename functionality, making it unclear to readers scanning the history. Please revise the title to clearly describe the primary change, for example: “Enable sharing input files between TnT and Deconv with file rename support.”
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch share_input_files

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 99dd5a2 and 3bf3776.

⛔ Files ignored due to path filters (75)
  • example-data/workspaces/demo_antibody/flashdeconv/cache/cache.db is excluded by !**/*.db
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/FD_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/quant.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/spec2.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/sequence/sequence.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_antibody/flashtnt/cache/cache.db is excluded by !**/*.db
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/FD_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/FTnT_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/internal_fragment_data.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/protein.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/prsms.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/quant.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/sequence_data.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/settings.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/spec2.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/tags.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/cache.db is excluded by !**/*.db
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/FD_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/quant.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/spec2.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/layout/layout.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/sequence/sequence.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_aqpz/flashtnt/cache/cache.db is excluded by !**/*.db
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/FD_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/FTnT_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/internal_fragment_data.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/protein.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/prsms.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/quant.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/sequence_data.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/settings.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/spec2.tsv is excluded by !**/*.tsv
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/tags.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashdeconv/cache/cache.db is excluded by !**/*.db
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/FD_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/out.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/quant.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/spec1.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/spec2.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/FD_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/out.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/quant.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/spec1.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/spec2.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashdeconv/logs/all.log is excluded by !**/*.log
  • example-data/workspaces/workshop/flashdeconv/logs/commands-and-run-times.log is excluded by !**/*.log
  • example-data/workspaces/workshop/flashdeconv/logs/minimal.log is excluded by !**/*.log
  • example-data/workspaces/workshop/flashquant/cache/cache.db is excluded by !**/*.db
  • example-data/workspaces/workshop/flashquant/cache/files/example/conflict_tsv.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashquant/cache/files/example/quant_tsv.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashquant/cache/files/example/trace_tsv.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/cache.db is excluded by !**/*.db
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/FD_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/FTnT_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/internal_fragment_data.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/out.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/protein.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/prsms.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/quant.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/sequence_data.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/settings.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/spec1.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/spec2.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/tags.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/FD_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/FTnT_parameters.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/internal_fragment_data.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/protein.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/prsms.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/quant.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/sequence_data.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/settings.pkl.gz is excluded by !**/*.gz
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/spec2.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/tags.tsv is excluded by !**/*.tsv
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_aqpz_20250525-203956/FD_parameters.pkl.gz is excluded by !**/*.gz
📒 Files selected for processing (53)
  • content/FLASHDeconv/FLASHDeconvDownload.py (4 hunks)
  • content/FLASHDeconv/FLASHDeconvSequenceInput.py (1 hunks)
  • content/FLASHDeconv/FLASHDeconvViewer.py (7 hunks)
  • content/FLASHTnT/FLASHTnTDownload.py (4 hunks)
  • content/FLASHTnT/FLASHTnTViewer.py (5 hunks)
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/FD_parameters.json (0 hunks)
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/out_deconv.mzML (0 hunks)
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/toppic_ms2.feature (0 hunks)
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/toppic_ms2.msalign (0 hunks)
  • example-data/workspaces/demo_antibody/flashdeconv/ini/FLASHDeconv.ini (0 hunks)
  • example-data/workspaces/demo_antibody/flashdeconv/params.json (0 hunks)
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/FD_parameters.json (0 hunks)
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/FTnT_parameters.json (0 hunks)
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/out_deconv.mzML (0 hunks)
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/toppic_ms2.feature (0 hunks)
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/toppic_ms2.msalign (0 hunks)
  • example-data/workspaces/demo_antibody/flashtnt/ini/FLASHDeconv.ini (0 hunks)
  • example-data/workspaces/demo_antibody/flashtnt/ini/FLASHTnT.ini (0 hunks)
  • example-data/workspaces/demo_antibody/flashtnt/params.json (0 hunks)
  • example-data/workspaces/demo_antibody/params.json (0 hunks)
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/FD_parameters.json (0 hunks)
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/out_deconv.mzML (0 hunks)
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/toppic_ms2.feature (0 hunks)
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/toppic_ms2.msalign (0 hunks)
  • example-data/workspaces/demo_aqpz/flashdeconv/ini/FLASHDeconv.ini (0 hunks)
  • example-data/workspaces/demo_aqpz/flashdeconv/params.json (0 hunks)
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/FD_parameters.json (0 hunks)
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/FTnT_parameters.json (0 hunks)
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/out_deconv.mzML (0 hunks)
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/toppic_ms2.feature (0 hunks)
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/toppic_ms2.msalign (0 hunks)
  • example-data/workspaces/demo_aqpz/flashtnt/ini/FLASHDeconv.ini (0 hunks)
  • example-data/workspaces/demo_aqpz/flashtnt/ini/FLASHTnT.ini (0 hunks)
  • example-data/workspaces/demo_aqpz/flashtnt/params.json (0 hunks)
  • example-data/workspaces/demo_aqpz/params.json (0 hunks)
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/FD_parameters.json (0 hunks)
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/toppic_ms1.feature (0 hunks)
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/toppic_ms2.feature (0 hunks)
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/FD_parameters.json (0 hunks)
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/toppic_ms1.feature (0 hunks)
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/toppic_ms2.feature (0 hunks)
  • example-data/workspaces/workshop/flashdeconv/ini/FLASHDeconv.ini (0 hunks)
  • example-data/workspaces/workshop/flashdeconv/params.json (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/FD_parameters.json (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/FTnT_parameters.json (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/toppic_ms1.feature (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/toppic_ms2.feature (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/FD_parameters.json (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/FTnT_parameters.json (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/out_deconv.mzML (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/toppic_ms2.feature (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/toppic_ms2.msalign (0 hunks)
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_aqpz_20250525-203956/FD_parameters.json (0 hunks)
💤 Files with no reviewable changes (48)
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/FD_parameters.json
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/FD_parameters.json
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/FTnT_parameters.json
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/out_deconv.mzML
  • example-data/workspaces/demo_antibody/flashtnt/ini/FLASHTnT.ini
  • example-data/workspaces/demo_aqpz/flashtnt/ini/FLASHTnT.ini
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/out_deconv.mzML
  • example-data/workspaces/demo_antibody/params.json
  • example-data/workspaces/workshop/flashdeconv/params.json
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/toppic_ms2.msalign
  • example-data/workspaces/demo_antibody/flashtnt/ini/FLASHDeconv.ini
  • example-data/workspaces/demo_aqpz/flashdeconv/params.json
  • example-data/workspaces/demo_aqpz/flashtnt/params.json
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/toppic_ms1.feature
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/out_deconv.mzML
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/FD_parameters.json
  • example-data/workspaces/demo_aqpz/params.json
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/toppic_ms2.feature
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/toppic_ms2.feature
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/FD_parameters.json
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/out_deconv.mzML
  • example-data/workspaces/demo_antibody/flashdeconv/params.json
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/FD_parameters.json
  • example-data/workspaces/demo_antibody/flashtnt/params.json
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/toppic_ms2.feature
  • example-data/workspaces/workshop/flashdeconv/ini/FLASHDeconv.ini
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/toppic_ms2.msalign
  • example-data/workspaces/demo_aqpz/flashtnt/ini/FLASHDeconv.ini
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/toppic_ms2.msalign
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/FD_parameters.json
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/toppic_ms2.feature
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_aqpz_20250525-203956/FD_parameters.json
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/toppic_ms2.msalign
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/toppic_ms1.feature
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/FTnT_parameters.json
  • example-data/workspaces/demo_aqpz/flashdeconv/cache/files/example_spectrum_aqpz_20250525-204620/FD_parameters.json
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/FTnT_parameters.json
  • example-data/workspaces/demo_antibody/flashdeconv/cache/files/example_spectrum_antibody_20250525-204443/out_deconv.mzML
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/toppic_ms2.feature
  • example-data/workspaces/demo_antibody/flashtnt/cache/files/example_spectrum_antibody_20250525-204250/toppic_ms2.msalign
  • example-data/workspaces/demo_aqpz/flashdeconv/ini/FLASHDeconv.ini
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/toppic_ms1.feature
  • example-data/workspaces/demo_aqpz/flashtnt/cache/files/example_spectrum_aqpz_20250525-204610/FTnT_parameters.json
  • example-data/workspaces/demo_antibody/flashdeconv/ini/FLASHDeconv.ini
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250525-204033/toppic_ms2.feature
  • example-data/workspaces/workshop/flashtnt/cache/files/example_fd_20250823-151911/toppic_ms2.feature
  • example-data/workspaces/workshop/flashdeconv/cache/files/example_fd_20250823-152120/FD_parameters.json
  • example-data/workspaces/workshop/flashtnt/cache/files/example_spectrum_antibody_20250525-204021/toppic_ms2.feature
🧰 Additional context used
🧬 Code graph analysis (4)
content/FLASHDeconv/FLASHDeconvViewer.py (2)
content/FLASHTnT/FLASHTnTViewer.py (1)
  • validate_selected_index (27-39)
src/workflow/FileManager.py (2)
  • get_results_list (392-430)
  • get_display_name (563-595)
content/FLASHTnT/FLASHTnTViewer.py (3)
content/FLASHDeconv/FLASHDeconvViewer.py (2)
  • validate_selected_index (21-31)
  • select_experiment (12-19)
src/workflow/FileManager.py (2)
  • get_results_list (392-430)
  • get_display_name (563-595)
src/render/render.py (1)
  • render_grid (54-105)
content/FLASHTnT/FLASHTnTDownload.py (1)
src/workflow/FileManager.py (3)
  • get_display_name (563-595)
  • rename_dataset (597-633)
  • get_all_files_except (484-510)
content/FLASHDeconv/FLASHDeconvDownload.py (1)
src/workflow/FileManager.py (3)
  • get_display_name (563-595)
  • rename_dataset (597-633)
  • get_all_files_except (484-510)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-full-app
  • GitHub Check: build-openms

Comment on lines +70 to +74
# Create display names and mappings
display_names = [file_manager.get_display_name(exp_id) for exp_id in results]
display_name_to_id = {file_manager.get_display_name(exp_id): exp_id for exp_id in results}
display_name_to_index = {n : i for i, n in enumerate(display_names)}
# Keep backward compatibility mapping for experiment IDs
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Duplicate display names hijack viewer selections.

Here too we key both display_name_to_id and display_name_to_index by the human-friendly label. If two runs share the same name (perfectly possible after renaming), the later entry clobbers the earlier one. The dropdown then always resolves to the last dataset with that label, so the wrong experiment loads and previously stored selections jump indices. Please keep the dataset ID as the canonical option value—e.g. pass results to the selectbox and supply a format_func that renders file_manager.get_display_name(exp_id)—or otherwise guarantee uniqueness when building the mapping.

🤖 Prompt for AI Agents
In content/FLASHDeconv/FLASHDeconvViewer.py around lines 70-74, the mappings use
human-friendly display names as keys which allows duplicate names to clobber
earlier entries; change the select/options to use the canonical experiment ID as
the option value (i.e. use results list/IDs as the selectbox values) and render
the label with a format_func that calls file_manager.get_display_name(exp_id),
or alternatively build maps keyed by exp_id (display_name_to_id =>
id->display_name and display_name_to_index => id->index) so every option is
unique and selections reliably map back to the correct experiment ID.

Comment on lines +67 to 74
# Create display names and mappings
display_names = [file_manager.get_display_name(exp_id) for exp_id in results]
display_name_to_id = {file_manager.get_display_name(exp_id): exp_id for exp_id in results}
display_name_to_index = {n : i for i, n in enumerate(display_names)}
# Keep backward compatibility mapping for experiment IDs
name_to_index = {n : i for i, n in enumerate(results)}

if len(layout) == 2 and side_by_side:
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Display-name collisions break experiment selection.

display_name_to_id / display_name_to_index use the display name as the dictionary key. After renaming, two experiments can legitimately share the same display name. In that case the later entry overwrites the former, so selecting the “other” duplicate in the dropdown resolves to the wrong dataset (and its index lookup also points to the last duplicate). We need the widget to keep the unique dataset ID as the underlying value—e.g. feed the selectbox with the results list and use format_func (or an expanded tuple) to render the display name—so every selection keeps its own ID while still showing friendly text. That avoids collisions without forcing unique display names.

🤖 Prompt for AI Agents
In content/FLASHTnT/FLASHTnTViewer.py around lines 67 to 74, display_name_to_id
and display_name_to_index use display names as keys which allows collisions to
overwrite entries; change the select widget to use the unique experiment IDs
(the entries from results) as the underlying values and render friendly text via
format_func or by passing (id, display_name) tuples so selections always map to
the correct dataset ID; replace the display-name-keyed dicts with mappings keyed
by experiment ID (e.g., id -> display_name and id -> index) and feed the
selectbox the results list (or id tuples) while using format_func to show
file_manager.get_display_name(id).

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