Skip to content

Viewer: move between the protein, peptide and PSM tables with the keyboard - #175

Open
t0mdavid-m wants to merge 4 commits into
mainfrom
claude/viewer-levels
Open

t0mdavid-m wants to merge 4 commits into
mainfrom
claude/viewer-levels

Conversation

@t0mdavid-m

@t0mdavid-m t0mdavid-m commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Before: in the Identification view, the protein, peptide and PSM tables only linked by clicking. Nothing showed where the picked row sat or what a table below had been narrowed to, and keyboard focus stayed in the table that was clicked.

After: Enter (or a double click) on a protein moves the keyboard to its peptides, and Enter on a peptide moves it to that peptide's PSMs. Backspace goes one table back up. Each table shows where its picked row is ("3 of 12"), and the peptide and PSM tables show a chip with the protein and peptide they are narrowed to.

The three tables pass level and narrowed_labels to the openms-insight Table. These options come from openms-insight #119 and #121. The template's visualization library gives them (display() of protein_table, protein_peptides and protein_psms), and passes only the options that the installed openms-insight's Table accepts. With openms-insight 0.7.5 from PyPI, the tables look and behave as they do today. The new behaviour turns on once a release with those two PRs is installed, so the requirements.txt pin should be raised then.

How: show_insight_table takes a new display dict. Its options are not part of the table's cache and are given only to the rendered Table. protein_data._place takes each table's options from the library's display().

Screenshots

Rendered with a local openms-insight build that merges #117, #119 and #121 (#117, the row position, was later dropped), on an example run of three files.

Light theme: after Enter on a protein and then on a peptide, the PSM table has the keyboard and its chips name the protein and peptide.

light

Dark theme: after Enter on a protein, the peptide table has the keyboard.

dark

Video (mp4): click a protein, then Enter, Down, Enter, Down, Backspace, Backspace.

levels

Checks

  • python -m pytest test_gui.py tests/: 1318 passed, 6 skipped. tests/test_viewer_levels.py covers taking the place from the library, and a library without it.
  • pylint --errors-only on the changed files: clean.

Depends on OpenMS/streamlit-template#617: the options now come from the template's visualization library, so this PR keeps no copy of them. Until that PR reaches OpenDDA through the template sync, the app draws as before, without them.


Generated by Claude Code

…tification tables

The protein, peptide and PSM tables pass level, show_position and
narrowed_labels to the openms-insight Table. Options the installed
openms-insight does not take yet are left out (table_options), so the
tables keep working until a release with them is installed.

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

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

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: 5cd88660-62b9-4b5b-9265-88f3db6d106a
  • 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

@t0mdavid-m t0mdavid-m self-assigned this Nov 20, 2026
# Conflicts:
#	src/common/insight_tables.py
#	src/viewer/protein_data.py
The protein, peptide and PSM tables get their level, position column and
narrowed labels from display() of the template's src/viz tables
(OpenMS/streamlit-template#617) instead of an app copy; until the template
sync brings it they draw without them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D5Wo2FHPpi5a8X6GppNxEk
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