Skip to content

Feature/add routing#21

Merged
ndorin merged 5 commits intomainfrom
feature/add-routing
May 1, 2026
Merged

Feature/add routing#21
ndorin merged 5 commits intomainfrom
feature/add-routing

Conversation

@ndorin
Copy link
Copy Markdown
Contributor

@ndorin ndorin commented May 1, 2026

This pull request introduces several improvements and refactors to the Essentials Web Config App, focusing on navigation usability, routing flexibility, and code consistency. The most significant changes are grouped below:

Navigation and Routing Enhancements

  • Refactored the main navigation (TopNav) to use a new AppNavLink component, which disables links when no appId is selected and improves user feedback. Also added the app version display to the navigation bar. (src/features/TopNav.tsx, src/styles.scss, [1] [2] [3] [4]
  • Updated routing in App.tsx to allow direct access to the login form for any :appId and simplified the login route structure. (src/App.tsx, src/App.tsxL55-L60)

Login and Authentication Improvements

  • Enhanced the login form to use the first available app if the provided appId is invalid or missing, ensuring a smoother authentication flow. Also added a prominent application title above the login form. (src/features/LoginForm.tsx, [1] [2] [3] [4]

Exception and Debug Console UI Refinements

  • Improved the rendering of initialization exceptions by using Fragment for proper key assignment and removed unnecessary console logging. (src/features/InitializationExceptions.tsx, [1] [2] [3] [4] [5]
  • Changed the debug filter clear button style to outline-secondary for better visual consistency. (src/features/DebugConsole/DebugFilters.tsx, src/features/DebugConsole/DebugFilters.tsxL36-R36)

Routing Visualization Logic

  • Updated the routing graph logic to ensure only visible devices are included in the graph, preventing hidden devices from affecting the layout. (src/features/Routing.tsx, src/features/Routing.tsxR128-R141)

Build and Configuration Updates

  • Added APP_VERSION as a global define in the Vite config to make the app version accessible in the UI, and updated dependency versions and formatting for consistency. (vite.config.ts, [1] [2] package.json, [3]

These changes collectively improve the user experience, code maintainability, and build process of the application.

andrew-welker
andrew-welker previously approved these changes May 1, 2026
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 improves navigation and routing behavior in the Essentials Web Config App, including more flexible login routing, better UI feedback in navigation, and a routing-graph layout fix to avoid hidden devices impacting the diagram.

Changes:

  • Refactors TopNav navigation links into a shared AppNavLink component and adds an app version display sourced from a Vite global define.
  • Simplifies routing so the login form is reachable at both /login and /:appId/login.
  • Adjusts Routing graph edge construction so only visible devices/tie lines participate in Dagre layout calculations.

Reviewed changes

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

Show a summary per file
File Description
vite.config.ts Adds global APP_VERSION define; formatting updates.
src/vite-env.d.ts Declares global APP_VERSION for TypeScript.
src/styles.scss Adds .nav-link-disabled styling.
src/features/TopNav.tsx Introduces AppNavLink, disables nav links when no appId, shows version in navbar.
src/features/Routing.tsx Filters layout edges to visible devices only to prevent hidden devices affecting layout.
src/features/MobileControl.tsx Removes a debug console.log.
src/features/LoginForm.tsx Improves appId fallback behavior and adds an application title above the login form.
src/features/InitializationExceptions.tsx Fixes key usage by switching to keyed Fragment; removes console logging.
src/features/DebugConsole/DebugFilters.tsx Changes clear button to outline-secondary.
src/App.tsx Updates route structure for simplified login access.
package.json Updates app version string.
tsconfig.tsbuildinfo Removes generated TS build info file from the repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/features/TopNav.tsx Outdated
Comment thread src/features/Routing.tsx Outdated
Comment thread src/features/Routing.tsx Outdated
Comment thread src/features/LoginForm.tsx
Comment thread src/features/TopNav.tsx Outdated
…safeAppId logic; refactor Routing and TopNav for improved readability and accessibility
@ndorin ndorin merged commit 67c8f1a into main May 1, 2026
2 checks passed
@ndorin ndorin deleted the feature/add-routing branch May 1, 2026 22:20
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