Skip to content

Improved frontend#22

Open
wiktorKycia wants to merge 27 commits intodatarabbit-ai:mainfrom
Rumeleq:main
Open

Improved frontend#22
wiktorKycia wants to merge 27 commits intodatarabbit-ai:mainfrom
Rumeleq:main

Conversation

@wiktorKycia
Copy link
Collaborator

Key changes

  • departments are now divided into rooms
  • added list view tab with patients' names displayed one after another in the form of a list

Minor changes

  • added some type hints
  • reorganised some parts of code, so it looks more logical
  • added english agent's id to env.sample
  • added altair package to main requirements.txt file

Rumeleq and others added 23 commits July 31, 2025 18:42
Changed the return type annotation of get_done_conversation_data from str to str | bool to reflect possible boolean return values.
Changed the return type of get_done_conversation_data to use GetConversationResponseModel for improved type safety. Also updated the import statement to include GetConversationResponseModel.
Split function signature and a long function call across multiple lines to improve code readability and maintainability. No functional changes were made.
Consolidated Streamlit session state variable initialization into a single loop for improved readability and maintainability. Removed redundant individual checks and assignments for each session state key.
Improved type annotations and default argument handling in patient queue functions in main.py. Added altair visualization library to requirements.txt.
This reverts commit 6b08891, reversing
changes made to 58ac4ed.
Refactored the bed grid to group beds into rooms with improved tooltip handling and updated the CSS for better layout and hover effects. Added Polish translations for 'Unoccupied' and 'Room' in the locale file.
Updated the create_box_grid function to wrap all user-facing strings with the translation function (_), ensuring that room, bed, tooltips, and personnel fields are translatable. Also replaced st.write with st.markdown for rendering room HTML, and removed debug print statements.
Replaces unordered bed row info with an ordered, localized mapping for tooltip display in the box grid. Ensures consistent header order and translation, and formats personnel fields appropriately.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the frontend interface by introducing a room-based bed organization system and adding a new list view tab for better patient management visualization.

Key changes:

  • Restructured bed display to group beds into rooms with a maximum of 3 beds per room
  • Added a new "List view" tab that displays patients in a vertical list format showing patient names
  • Improved session state initialization by consolidating multiple individual checks into a single loop

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

File Description
frontend/main.py Major refactoring to support room-based bed layout, added list view functionality, and improved session state management
frontend/locales/pl/LC_MESSAGES/base.po Added Polish translations for new UI elements like "List view", "Room", and "Unoccupied"
frontend/agent.py Enhanced type hints for conversation data handling functions
.env.sample Added configuration for English voice agent ID

Copy link
Member

@naibatsuteki naibatsuteki left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants

Comments