Skip to content

improve upload and inspect page UX#1

Merged
gurvinder merged 2 commits into
mainfrom
changes/ui
May 26, 2026
Merged

improve upload and inspect page UX#1
gurvinder merged 2 commits into
mainfrom
changes/ui

Conversation

@Alan0893
Copy link
Copy Markdown
Owner

@Alan0893 Alan0893 commented May 21, 2026

The vector database dropdown defaulted to "Create New" instead of the first existing database, document deletion was implemented in the backend code but never exposed in the UI, empty vector stores showed no feedback, and the table CSS used hardcoded dark-theme colors that looked off in light mode.

The Inspect sub-pages (Models, Providers, Vector Databases, Shields) had no error handling: if the LlamaStack backend was unreachable, the pages would crash with a raw Python traceback. Additionally, the Models page called models.list() twice per render, and the Providers table was hardcoded to 500px width.

Upload page changes:

  • Default selection now picks the first existing vector database instead of "Create New" when databases exist
  • Added a delete button (trash icon) on each document row, wired to the existing _delete_file_from_vector_store API
  • Added an empty state message ("No documents found...") when a vector store has no documents
  • Table borders now use rgba() values that adapt to both light and dark Streamlit themes
  • File listing errors now display as st.warning instead of print() to console

Inspect page changes:

  • All four sub-pages (Models, Providers, Vector Databases, Shields) now wrap API calls in try/except with user-friendly error messages
  • Added st.spinner loading indicators while data is being fetched
  • Providers table uses use_container_width=True instead of hardcoded width=500 for responsive layout
  • Models page no longer calls models.list() twice per render
  • Fixed variable shadowing in Providers where loop variable providers shadowed the function name

Tests

Suite Passed Skipped Failed
Unit tests 23 0 0
Integration tests 24 1 0
LlamaStack integration 4 0 0
UI E2E (Playwright) 24 2 0
Total 75 3 0

Skipped tests:

  • test_chat_page_loads — requires full Streamlit app context
  • test_maas_chat_completion_direct_mode — requires live MaaS model endpoint
  • test_maas_model_selection — requires live MaaS model endpoint

@Alan0893 Alan0893 self-assigned this May 21, 2026
Copy link
Copy Markdown
Collaborator

@gurvinder gurvinder left a comment

Choose a reason for hiding this comment

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

Separate out code into commits, each "feature" or isolated functionality change should be its own commit so it can be independently rolled back without touching any other part of the code.

Example Commits:

  • Smart default — pick the first real DB, not "Create New"
  • border-top rgba(128, 128, 128, 0.3) and background-color rgba(128, 128, 128, 0.06) change
  • etc...

@gurvinder gurvinder merged commit f9d241f into main May 26, 2026
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