Skip to content

Conversation

@felipeimpieri
Copy link
Owner

Summary

  • add a Streamlit UI state helper module for working with query parameters
  • support both the new st.query_params API and legacy experimental APIs
  • provide helpers to coerce parameter types and keep session state in sync

Testing

  • python -m py_compile quantboard/ui/state.py

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +20 to +21
if target_type is type(None):
return None

Choose a reason for hiding this comment

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

P1 Badge Honor provided values when default is None

_coerce_type short-circuits whenever the default is None, returning None even if a query param or existing session-state value is present. Any get_param("foo", None) call will therefore overwrite a supplied foo query string or previously set session state with None, preventing optional parameters from ever being read. The helper should only fall back to None when the incoming value is absent or cannot be coerced, not unconditionally discard it.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant