Skip to content

chore: remove UserStatus.UNKNOWN#160

Merged
cbachhuber merged 3 commits intomainfrom
remove-unknown-user-status
Mar 19, 2026
Merged

chore: remove UserStatus.UNKNOWN#160
cbachhuber merged 3 commits intomainfrom
remove-unknown-user-status

Conversation

@cbachhuber
Copy link
Copy Markdown
Collaborator

As agreed in #151. Audience view:

image

@cbachhuber cbachhuber requested a review from BayerC March 19, 2026 15:01
Comment thread src/open_cups/app.py
Comment on lines +125 to +134
st.markdown(
"""
<style>
div[data-testid="stRadio"] label {
padding: 6px;
}
</style>
""",
unsafe_allow_html=True,
)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Without this, the radio buttons look weirdly compact next to the bar chart. And I don't want to reduce the bar chart's height.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In show_user_status_selection, consider making the index = status_options.index(current_user_status) more defensive (e.g., defaulting to 0 if the status isn’t in the list) to avoid runtime errors if new statuses are introduced or if state becomes inconsistent.
  • The global CSS rule targeting div[data-testid="stRadio"] label will affect all radio components in the app; if the padding change is only intended for the user status control, consider scoping the selector more narrowly (e.g., wrapping that specific radio in a container with a dedicated class).
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `show_user_status_selection`, consider making the `index = status_options.index(current_user_status)` more defensive (e.g., defaulting to 0 if the status isn’t in the list) to avoid runtime errors if new statuses are introduced or if state becomes inconsistent.
- The global CSS rule targeting `div[data-testid="stRadio"] label` will affect all radio components in the app; if the padding change is only intended for the user status control, consider scoping the selector more narrowly (e.g., wrapping that specific radio in a container with a dedicated class).

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (eaf71db) to head (f0bcc73).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #160   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          503       498    -5     
=========================================
- Hits           503       498    -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cbachhuber cbachhuber merged commit 2077cd1 into main Mar 19, 2026
8 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.

2 participants