Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions api/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const defs = {
authorize: withUserSession,
fn: ({ session }) => session,
output: UserDef,
description: 'Handle Google OAuth callback',
description: 'Get current authenticated user information',
}),
'GET/api/picture': route({
fn: (_ctx, { hash }) => getPicture(hash),
Expand Down Expand Up @@ -262,7 +262,7 @@ const defs = {
}),
'GET/api/deployment': route({
authorize: withAdminSession,
fn: async (_ctx, url) => {
fn: async (_ctx, { url }) => {
const dep = DeploymentsCollection.get(url)
Comment on lines +265 to 266
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.
if (!dep) throw respond.NotFound()
const { tokenSalt, ...deployment } = dep
Expand All @@ -274,7 +274,7 @@ const defs = {
token,
}
},
input: STR(),
input: OBJ({ url: STR('Deployment URL') }),
output: deploymentOutput,
description: 'Get a deployment by ID',
}),
Expand Down Expand Up @@ -316,7 +316,7 @@ const defs = {
output: deploymentOutput,
description: 'Update a deployment by ID',
}),
'GET/api/deployment/token/regenerate': route({
'POST/api/deployment/token/regenerate': route({
authorize: withAdminSession,
fn: async (_ctx, { url }) => {
const dep = DeploymentsCollection.get(url)
Expand Down
2 changes: 1 addition & 1 deletion web/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const App = () => {
<header class='w-full shrink-0 z-0'>
<Header />
</header>
<main class='w-full flex-1 relative'>
<main class='w-full flex-1 flex flex-col relative min-h-0 overflow-hidden'>
{renderPage()}
</main>
</div>
Expand Down
4 changes: 2 additions & 2 deletions web/pages/DeploymentPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -841,8 +841,8 @@ function TabNavigation({

const logData = api['POST/api/deployment/logs'].signal()
effect(() => {
const { dep, lq } = url.params
if (dep) {
const { dep, lq, sbi } = url.params
if (dep && sbi === 'deployment') {
const filterRows = parseFilters('l').filter((r) =>
r.key !== 'key' && r.value
).map((r) => ({
Expand Down
6 changes: 3 additions & 3 deletions web/pages/ProjectPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { effect } from '@preact/signals'
import { navigate, url } from '@01edu/signal-router'
import { Sidebar } from '../components/SideBar.tsx'
import { user } from '../lib/session.ts'
import { SettingsPage } from './project/SettingsPage.tsx'
import { SettingsPage } from './SettingsPage.tsx'
import { deployments, project, sidebarItems } from '../lib/shared.tsx'

effect(() => {
Expand All @@ -29,9 +29,9 @@ export function ProjectPage() {
}

return (
<div class='drawer lg:drawer-open'>
<div class='drawer lg:drawer-open flex-1 min-h-0'>
<input id='drawer-toggle' type='checkbox' class='drawer-toggle' />
<div class='drawer-content flex flex-col'>
<div class='drawer-content flex flex-col overflow-hidden h-full min-h-0'>
<Component />
</div>
<Sidebar
Expand Down
Loading
Loading