Skip to content

Updates, Acars, login callbacks, settings#39

Merged
dev-banane merged 2 commits intomainfrom
UpdateACARSChartsDrawer
Oct 19, 2025
Merged

Updates, Acars, login callbacks, settings#39
dev-banane merged 2 commits intomainfrom
UpdateACARSChartsDrawer

Conversation

@1ceit
Copy link
Copy Markdown
Collaborator

@1ceit 1ceit commented Oct 19, 2025

Authentication Improvements:

  • Added support for an optional callback parameter in the Discord OAuth flow. The backend now encodes this as state, decodes it on callback, and redirects the user to the specified path if provided. This enables more flexible post-login navigation. [1] [2]

Websocket and Real-time Updates:

  • The overview websocket now fetches additional user data (such as VATSIM rating and event controller status) for controllers, and emits real-time updates to the overview dashboard when a controller's position changes. This ensures the overview reflects the latest session user roles and badges. [1] [2] [3] [4] [5] [6]

Frontend Routing:

  • Moved the /settings route to be nested under the protected routes section, ensuring only authenticated users can access settings. [1] [2]

ACARS Settings and Chart Drawer Enhancements:

  • Added new settings in AcarsSettings for:
    • Toggling automatic redirect to ACARS after flight plan submission.
    • Choosing between "legacy" and "list" chart drawer view modes.
  • The chart drawer now adapts its UI and chart selection logic based on the selected view mode, and supports improved airport chart organization. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

UI/UX Refinements:

  • Minor UI improvements in ACARS settings and chart drawer, such as better panel labeling, improved preview instructions, and removal of the sidebar divider in the settings preview. [1] [2] [3] [4]

Most Important Changes

Authentication

  • Added support for an optional callback parameter in Discord OAuth, encoding it in the state parameter and redirecting users to the specified path after authentication. [1] [2]

Websocket/Real-time Updates

  • Overview websocket now retrieves VATSIM rating and event controller status for controllers, and emits real-time overview updates when controller positions change. [1] [2] [3] [4] [5] [6]

Frontend Routing

  • Moved /settings route under protected routes to restrict access to authenticated users. [1] [2]

ACARS Settings and Chart Drawer

  • Added settings for auto-redirect to ACARS and chart drawer view mode; updated chart drawer to support new view modes and improved airport chart selection. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

UI/UX Improvements

  • Improved ACARS settings preview instructions and removed the sidebar divider from the preview for clarity. [1] [2]

@1ceit 1ceit requested review from Copilot and dev-banane October 19, 2025 01:35
Copy link
Copy Markdown

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 introduces authentication callback support, websocket enhancements for real-time controller updates, ACARS settings improvements, and chart drawer functionality upgrades. The changes enhance user experience with flexible post-login navigation, improved controller visibility, and better chart management.

  • Added Discord OAuth callback parameter support for post-login redirection
  • Enhanced websockets to emit real-time controller updates with VATSIM rating and event controller badges
  • Added new ACARS settings for auto-redirect and chart drawer view modes

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/fetch/auth.ts Added optional callback parameter to Discord OAuth login URL generation
src/utils/acars.ts Updated chart credit attributions to include PFATC co-attribution
src/types/settings.ts Added new ACARS settings for chart view mode and auto-redirect
src/sockets/sessionUsersSocket.ts Changed default position from 'ALL' to 'APP'
src/sockets/overviewSocket.ts Enhanced with controller rating and event controller status
src/pages/Submit.tsx Added auto-redirect to ACARS functionality with settings integration
src/pages/Login.tsx Implemented callback parameter support in login flow
src/pages/Home.tsx Updated developer titles and styling
src/pages/Flights.tsx Added ATIS reminder modal functionality
src/pages/ACARS.tsx Enhanced UI with new buttons, notes expiration, and chart drawer improvements
src/components/modals/AtisReminderModal.tsx Fixed domain URL and updated copy functionality
src/components/acars/AcarsTerminal.tsx Updated terminal title and PDC button styling
src/components/acars/AcarsSidebar.tsx Added controller badges and profile links
src/components/acars/AcarsChartDrawer.tsx Major overhaul with legacy/list view modes and improved UI
src/components/Settings/AcarsSettings.tsx Added chart view mode and auto-redirect settings
src/App.tsx Moved settings route to protected section
server/websockets/sessionUsersWebsocket.ts Added overview data broadcasting on position changes
server/websockets/overviewWebsocket.ts Enhanced with user rating and role data fetching
server/routes/auth.ts Implemented state-based callback parameter handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/utils/acars.ts Outdated
Copy link
Copy Markdown
Member

@dev-banane dev-banane left a comment

Choose a reason for hiding this comment

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

callback query is nice

@dev-banane dev-banane merged commit d663ea9 into main Oct 19, 2025
1 check 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.

3 participants