Skip to content

Conversation

@abdotop
Copy link
Member

@abdotop abdotop commented Jan 30, 2026

refactor: reimplement SettingsPage and adjust API routes.

@abdotop abdotop self-assigned this Jan 30, 2026
@abdotop abdotop linked an issue Jan 30, 2026 that may be closed by this pull request
@abdotop abdotop changed the title Refactor and fix Project Page Settings DT-93: Refactor and fix Project Page Settings Jan 30, 2026
…eployment management and token regeneration, update `GET/api/deployment` input, and refine UI layout.
Copilot AI review requested due to automatic review settings February 2, 2026 23:19
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 refactors the project settings page by relocating and reimplementing the SettingsPage component, while also fixing API route definitions.

Changes:

  • Moved SettingsPage from web/pages/project/SettingsPage.tsx to web/pages/SettingsPage.tsx with complete UI redesign
  • Updated API routes to correct HTTP methods and parameter structures
  • Added layout improvements for proper overflow handling

Reviewed changes

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

Show a summary per file
File Description
web/pages/project/SettingsPage.tsx Complete removal of old SettingsPage implementation
web/pages/SettingsPage.tsx New SettingsPage with redesigned UI, deployment management, and token handling
web/pages/ProjectPage.tsx Updated import path and added overflow handling classes
web/pages/DeploymentPage.tsx Added sidebar item check to logs fetching logic
web/index.tsx Enhanced main layout with flexbox and overflow classes
api/routes.ts Fixed API route descriptions, HTTP methods, and parameter structures

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

Comment on lines +265 to 266
fn: async (_ctx, { url }) => {
const dep = DeploymentsCollection.get(url)
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

The parameter name 'url' shadows the imported 'url' from '@01edu/signal-router'. Consider renaming this parameter to 'deploymentUrl' or 'depUrl' to avoid confusion.

Suggested change
fn: async (_ctx, { url }) => {
const dep = DeploymentsCollection.get(url)
fn: async (_ctx, { url: deploymentUrl }) => {
const dep = DeploymentsCollection.get(deploymentUrl)

Copilot uses AI. Check for mistakes.
const projectId = project.data?.slug
if (!projectId) return
try {
const depUrl = new URL(fd.get('url') as string).host
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

If the URL is malformed, this will throw a generic TypeError. Consider wrapping this in a try-catch and providing a clearer error message like 'Invalid URL format' to improve user experience.

Copilot uses AI. Check for mistakes.
replace: true,
})
} catch (e) {
addDeploymentError.value = e instanceof Error ? e.message : 'Unknown error'
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

The error message 'Unknown error' is not descriptive. Consider using a more specific message such as 'Failed to add deployment' to provide better context to users.

Suggested change
addDeploymentError.value = e instanceof Error ? e.message : 'Unknown error'
addDeploymentError.value = e instanceof Error
? e.message
: 'Failed to add deployment'

Copilot uses AI. Check for mistakes.
<select
class='select select-bordered select-sm w-full max-w-xs'
value={selectedUrl || ''}
defaultValue={selectedUrl || ''}
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

Both 'value' and 'defaultValue' are set on the same select element. The 'value' prop makes this a controlled component, so 'defaultValue' is redundant and will be ignored. Remove the 'defaultValue' prop.

Suggested change
defaultValue={selectedUrl || ''}

Copilot uses AI. Check for mistakes.
@kigiri kigiri merged commit 4151472 into master Feb 4, 2026
2 checks passed
@kigiri kigiri deleted the 92-refactor-and-fix-project-page-settings branch February 4, 2026 10:24
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.

Refactor and fix Project Page Settings

2 participants