You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR removes unused variables and cleans up code formatting issues introduced in PR #438 (feat/routes_to_permission).
Changes
Removed Unused Variables
src/middleware.ts
Removed unused token variable that was declared but never referenced. The session variable already contains all necessary authentication information.
src/hooks/useAuth/index.ts
Removed unused singInResp variable in handleLogin function. The signIn() call is now awaited directly without storing the result, since setUser() is called unconditionally.
Removed unused userclearFromStoreResp variable in handleLogout function. The clearUser() call is now invoked directly, and the success message is always shown.
src/hocs/withAuthorization.tsx
Removed unused isAuthRoute helper function that was defined but never called anywhere in the codebase.
Code Cleanup
src/app/auth/login/page.tsx
Removed extraneous semicolon at the end of the file.
src/app/admin/layout.tsx
Removed extra blank lines for consistency.
Fixed function declaration to use arrow function syntax, matching the pattern used elsewhere in the codebase.
Your pull request was blocked from triggering preview deployments
Why was this blocked?
User: Copilot
Repository: sparked-next
Permission Level: none
Required Level: write, maintain, or admin
How to resolve this:
Option 1: Get Collaborator Access (Recommended)
Ask a repository maintainer to invite you as a collaborator with write permissions or higher.
Option 2: Request Permission Override
Ask a repository administrator to disable security validation for this specific application if appropriate.
For Repository Administrators:
To disable this security check (⚠️not recommended for public repositories):
Enter to preview settings and disable the security check.
This security measure protects against malicious code execution in preview deployments. Only trusted collaborators should have the ability to trigger deployments.
🛡️ Learn more about this security feature
This protection prevents unauthorized users from:
Executing malicious code on the deployment server
Accessing environment variables and secrets
Potentially compromising the infrastructure
Preview deployments are powerful but require trust. Only users with repository write access can trigger them.
OlivierJM
temporarily deployed
to
copilot/remove-unused-vars-and-optimization - sparked-app PR #439
October 7, 2025 14:42 — with Render
Destroyed
CopilotAI
changed the title
[WIP] Remove unused variables from codebase for clarity
Remove unused variables and clean up code formatting in PR #438
Oct 7, 2025
copilot/remove-unused-vars-and-optimization - sparked-app PR #439—7fbb6ff3
Deployed
Oct 7, 2025 by
OlivierJM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes unused variables and cleans up code formatting issues introduced in PR #438 (feat/routes_to_permission).
Changes
Removed Unused Variables
src/middleware.ts
tokenvariable that was declared but never referenced. Thesessionvariable already contains all necessary authentication information.src/hooks/useAuth/index.ts
singInRespvariable inhandleLoginfunction. ThesignIn()call is now awaited directly without storing the result, sincesetUser()is called unconditionally.userclearFromStoreRespvariable inhandleLogoutfunction. TheclearUser()call is now invoked directly, and the success message is always shown.src/hocs/withAuthorization.tsx
isAuthRoutehelper function that was defined but never called anywhere in the codebase.Code Cleanup
src/app/auth/login/page.tsx
src/app/admin/layout.tsx
Impact
These changes improve code quality and maintainability by removing dead code and enforcing consistent formatting.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.