Bugfixes + Manuelle reports #127

Merged
PxlLoewe merged 5 commits from staging into release 2025-07-28 00:00:57 +00:00
PxlLoewe commented 2025-07-27 23:31:18 +00:00 (Migrated from github.com)

This pull request introduces several updates across multiple files, focusing on improving user experience, optimizing performance, and adding new features. The most significant changes include reducing the refetch interval for live data queries, introducing a new "Create Report" feature, and cleaning up unnecessary code for better maintainability.

Performance Improvements:

  • Reduced the refetchInterval for livekitRooms queries from 10 seconds to 5 seconds in multiple components to improve real-time updates (StationStatusToast.tsx [1] AircraftMarkerTabs.tsx [2] AdminPanel.tsx [3]).

New Features:

  • Added a "Create Report" functionality, including a new NewReportForm component that allows admins to create reports with user search and role selection capabilities (NewReport.tsx [1] actions.ts [2] new/page.tsx [3]).
  • Enhanced the UserReports section to include a button for creating a new report pre-filled with the selected user's ID (forms.tsx (apps/hub/app/(app)/admin/user/[id]/_components/forms.tsxL487-R497)).

Code Cleanup and UI Adjustments:

  • Removed unused useState and setDeleteLoading logic in the KeywordForm component to simplify the code (Form.tsx [1] [2] [3]).
  • Standardized class names for UI components to improve consistency and readability (Form.tsx [1] [2]).
  • Updated various text alignment and styling for better UI presentation (ReportSenderInfo [1] ReportAdmin [2] ReportPenalties [3]).

Backend Enhancements:

  • Added a createReport function to the backend for handling new report submissions (actions.ts).
  • Introduced a getUser function to fetch users based on search criteria (action.ts).

Configuration Updates:

  • Increased the command_timeout in the deployment workflow from 30 minutes to 60 minutes to accommodate longer-running commands (deploy-staging.yml).
This pull request introduces several updates across multiple files, focusing on improving user experience, optimizing performance, and adding new features. The most significant changes include reducing the refetch interval for live data queries, introducing a new "Create Report" feature, and cleaning up unnecessary code for better maintainability. ### Performance Improvements: * Reduced the `refetchInterval` for `livekitRooms` queries from 10 seconds to 5 seconds in multiple components to improve real-time updates (`StationStatusToast.tsx` [[1]](diffhunk://#diff-407bea63ac5664ad6e8abb01918e2e0e3041474fcc2ee2fb512b1be3a04333d2L28-R28) `AircraftMarkerTabs.tsx` [[2]](diffhunk://#diff-9f02d50eb941d7b1df6a94e6af333fc20f03e6721649fa913c995021c28675faL237-R237) `AdminPanel.tsx` [[3]](diffhunk://#diff-4f5a0ce8b03dcc6c2c15edff0b6ecf8b84aa259e17a37901dc61642825367acaL38-R38)). ### New Features: * Added a "Create Report" functionality, including a new `NewReportForm` component that allows admins to create reports with user search and role selection capabilities (`NewReport.tsx` [[1]](diffhunk://#diff-3228d364009026d074cb074728b3df335ad25a6d93daffc94f342f4773ec0210R1-R111) `actions.ts` [[2]](diffhunk://#diff-d1ea83216f8731253fe66c93d836a27c13988890aa72b7826550758d2ed45643L4-R19) `new/page.tsx` [[3]](diffhunk://#diff-8593bcaaa9ab3e5ae9877ba1fb20d1f6572d410f32c63e6720800c4a984fc4f6R1-R21)). * Enhanced the `UserReports` section to include a button for creating a new report pre-filled with the selected user's ID (`forms.tsx` ([apps/hub/app/(app)/admin/user/[id]/_components/forms.tsxL487-R497](diffhunk://#diff-a772df66091e0b934c1b0aa99ddd4187bdd97a1f48c5fbbed962a0c252818f5aL487-R497))). ### Code Cleanup and UI Adjustments: * Removed unused `useState` and `setDeleteLoading` logic in the `KeywordForm` component to simplify the code (`Form.tsx` [[1]](diffhunk://#diff-8506ce57710e6d6932ea0ccb46345a53bcdeeb671c0ed488e897b6286f69991aL8) [[2]](diffhunk://#diff-8506ce57710e6d6932ea0ccb46345a53bcdeeb671c0ed488e897b6286f69991aL20) [[3]](diffhunk://#diff-8506ce57710e6d6932ea0ccb46345a53bcdeeb671c0ed488e897b6286f69991aL86)). * Standardized class names for UI components to improve consistency and readability (`Form.tsx` [[1]](diffhunk://#diff-8506ce57710e6d6932ea0ccb46345a53bcdeeb671c0ed488e897b6286f69991aL31-R35) [[2]](diffhunk://#diff-8506ce57710e6d6932ea0ccb46345a53bcdeeb671c0ed488e897b6286f69991aL73-R71)). * Updated various text alignment and styling for better UI presentation (`ReportSenderInfo` [[1]](diffhunk://#diff-745389a4a27c7079dc7bbdfb7d2f8798bec3463720eb6603fb837ce68d49b9e8L36-R37) `ReportAdmin` [[2]](diffhunk://#diff-745389a4a27c7079dc7bbdfb7d2f8798bec3463720eb6603fb837ce68d49b9e8L85-R85) `ReportPenalties` [[3]](diffhunk://#diff-745389a4a27c7079dc7bbdfb7d2f8798bec3463720eb6603fb837ce68d49b9e8L144-R144)). ### Backend Enhancements: * Added a `createReport` function to the backend for handling new report submissions (`actions.ts`). * Introduced a `getUser` function to fetch users based on search criteria (`action.ts`). ### Configuration Updates: * Increased the `command_timeout` in the deployment workflow from 30 minutes to 60 minutes to accommodate longer-running commands (`deploy-staging.yml`).
Sign in to join this conversation.