Skip to content

Conversation

@t0mdavid-m
Copy link
Member

@t0mdavid-m t0mdavid-m commented Aug 10, 2025

This update gives FLASHApp a more modern look.

Summary by CodeRabbit

  • New Features

    • Redesigned quickstart with a polished hero, large workflow navigation buttons, and an improved Windows download panel.
    • Sequence handling updated to recognize the 'Z' residue.
  • Style

    • Comprehensive custom styling and responsive layout for workflow and download sections.
  • Bug Fixes

    • Floating-point inputs now display with five decimal places.
  • Chores

    • Installer/app version bumped to 0.9.0 and packaging dependency constraint tightened.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Refactors the quickstart page into a modular, styled Streamlit UI with CSS-injection, navigation buttons, and a conditional download section. Adds five-decimal formatting for float inputs, pins autowrap<0.23 in the Dockerfile, bumps app version/name to 0.9.0 (settings + Windows build workflow), and adds amino-acid entry 'Z': 0 to the mass mapping.

Changes

Cohort / File(s) Change Summary
Quickstart Page Refactor
content/quickstart.py
Replaced static markdown/info layout with modular functions: inject_workflow_button_css(), create_navigation_button(), render_workflow_selection(), render_enhanced_download_section(), and main() to render a styled interactive quickstart UI. Removed previous static content.
Float Input Formatting
src/workflow/StreamlitUI.py
Set format="%0.5f" on st.number_input for float parameters to display five decimal places; no other logic changed.
Dependency Version Pinning
Dockerfile
Constrained pip install to autowrap<0.23 (was unconstrained).
Version / CI Name Bump
settings.json
.github/workflows/...build-windows-executable-app.yaml
Bumped project version in settings.json from 0.8.4 → 0.9.0 and updated APP_NAME in Windows build workflow to FLASHApp-0.9.0.
Amino Acid Mapping
src/render/sequence.py
Added 'Z': 0 to aa_masses dictionary (Glx placeholder mass) to handle sequences containing 'Z'.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant StreamlitApp
    participant QuickstartModule

    User->>StreamlitApp: Open Quickstart Page
    StreamlitApp->>QuickstartModule: Call main()
    QuickstartModule->>QuickstartModule: inject_workflow_button_css()
    QuickstartModule->>QuickstartModule: render_workflow_selection()
    QuickstartModule->>QuickstartModule: render_enhanced_download_section()
    QuickstartModule-->>StreamlitApp: Render interactive UI (hero + navigation buttons + download)
    StreamlitApp-->>User: Display styled quickstart interface
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Update Front Page #35 — Direct overlap: modifies content/quickstart.py with the same CSS injection and navigation/button functions.
  • Update logo #4 — Related UI/branding changes to the quickstart hero/logo area in content/quickstart.py.
  • Fix sequence view #18 — Related version/CI updates: changes to APP_NAME in the Windows build workflow and project version metadata.

Poem

🐇
I hopped in to tidy the start,
Buttons and CSS, a tiny art.
Five decimals shining bright,
Version bumped, the build takes flight.
Glx gets a Z — short and sweet,
This rabbit hops off—job complete! 🥕✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fda9a83 and 406186b.

📒 Files selected for processing (3)
  • .github/workflows/build-windows-executable-app.yaml (1 hunks)
  • settings.json (1 hunks)
  • src/render/sequence.py (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch new_version

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 0

🧹 Nitpick comments (4)
src/workflow/StreamlitUI.py (1)

746-754: Align step size with 5-decimal format for better UX

Format is set to 5 decimals, but step=1.0 prevents fine-grained increments via the UI. Recommend step=1e-5 to match the displayed precision.

-                            step=1.0,
+                            step=1e-5,
content/quickstart.py (3)

8-234: Trim unused/brittle CSS and avoid duplicate rules

  • Most .workflow-* class styles aren’t used by the current button implementation (which relies on .st-key-* targeting). Consider removing unused rules to reduce CSS payload.
  • The .workflow-button block is duplicated later (margin override). Consolidate into a single definition.
  • Selectors like [data-testid="column"] and .stColumn > div depend on Streamlit internals and may break with updates. Prefer layout options via Streamlit APIs.
-        /* Reduce button margins for tighter layout */
-        .workflow-button {
-            margin-bottom: 0.5rem !important;
-        }

368-370: Guard against missing hero image to avoid runtime errors

If the asset is missing, st.image will fail. Add a simple existence check with a graceful fallback.

-    with logo_col:
-        st.image("assets/OpenMS.png", width=200)
+    with logo_col:
+        img_path = Path("assets/OpenMS.png")
+        if img_path.exists():
+            st.image(str(img_path), width=200)
+        else:
+            st.caption("OpenMS")

423-434: Use standard MIME type and combine context managers (SIM117)

  • Prefer application/zip over archive/zip.
  • Combine nested with statements to satisfy SIM117 and reduce indentation.
-            col1, col2, col3 = st.columns([2, 2, 2])
-            with col2:
-                with open("OpenMS-App.zip", "rb") as file:
-                    st.download_button(
-                        label="📥 Download for Windows",
-                        data=file,
-                        file_name="OpenMS-App.zip",
-                        mime="archive/zip",
-                        type="secondary",
-                        use_container_width=True,
-                        help="Download FLASHApp for Windows systems"
-                    )
+            col1, col2, col3 = st.columns([2, 2, 2])
+            with col2, open("OpenMS-App.zip", "rb") as file:
+                st.download_button(
+                    label="📥 Download for Windows",
+                    data=file,
+                    file_name="OpenMS-App.zip",
+                    mime="application/zip",
+                    type="secondary",
+                    use_container_width=True,
+                    help="Download FLASHApp for Windows systems"
+                )
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cdc8eb8 and e4ef45c.

📒 Files selected for processing (2)
  • content/quickstart.py (1 hunks)
  • src/workflow/StreamlitUI.py (1 hunks)
🧰 Additional context used
🪛 Ruff (0.12.2)
content/quickstart.py

424-425: Use a single with statement with multiple contexts instead of nested with statements

Combine with statements

(SIM117)

⏰ 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
🔇 Additional comments (2)
content/quickstart.py (2)

469-483: Main composition looks good

CSS injection, workflow selection, and download section are orchestrated cleanly.


236-345: No issues: st.switch_page targets are registered

  • Verified that content/FLASHDeconv/FLASHDeconvWorkflow.py,
    content/FLASHTnT/FLASHTnTWorkflow.py, and
    content/FLASHQuant/FLASHQuantFileUpload.py exist in the repo.
  • Confirmed each is listed in app.py’s pages = { … st.Page(Path("content", "...Workflow.py")…) } registry.
  • Calls to st.switch_page(page_path) in content/quickstart.py will resolve correctly.

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: 0

🧹 Nitpick comments (1)
Dockerfile (1)

83-83: Unify pip invocation and reduce image size; optionally document the pin’s rationale.

Use python -m pip consistently and add --no-cache-dir to keep layers smaller. Also consider a brief comment explaining why autowrap is capped for future maintainers.

Apply this diff:

-RUN pip install --upgrade pip && python -m pip install -U setuptools nose 'Cython<3.1' 'autowrap<0.23' pandas 'numpy==1.26.4' pytest
+RUN python -m pip install --upgrade pip && \
+    python -m pip install --no-cache-dir -U setuptools nose "Cython<3.1" "autowrap<0.23" pandas "numpy==1.26.4" pytest
+    # Note: autowrap is pinned <0.23 due to compatibility constraints with our build toolchain.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e4ef45c and fda9a83.

📒 Files selected for processing (1)
  • Dockerfile (1 hunks)
🧰 Additional context used
🪛 Hadolint (2.12.0)
Dockerfile

[error] 83-83: Ensure the shebang uses an absolute path to the interpreter.

(SC2239)

⏰ 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-openms
  • GitHub Check: build-full-app
🔇 Additional comments (2)
Dockerfile (2)

83-83: Good pin with proper quoting for shell safety.

Confining autowrap to <0.23 and quoting the specifier (to avoid shell redirection) is correct. This should stabilize builds if newer autowrap releases introduced breaking changes.


83-83: Hadolint SC2239 likely a false positive; please verify shebang.

Static analysis flagged a shebang issue at this line, but the only shebang created here appears at Lines 165–168 and already uses an absolute path (#!/bin/bash). Please re-run hadolint and confirm; if needed, ensure the generated /app/entrypoint.sh starts with an absolute shebang.

If there’s still a warning, replacing the shebang with an explicit absolute path (as you have) or #!/usr/bin/env bash is acceptable, but the former is preferred in containers.

@t0mdavid-m t0mdavid-m merged commit c691053 into develop Aug 11, 2025
3 of 4 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Aug 25, 2025
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