chore: auto-commit from dashboard

This commit is contained in:
2026-04-28 10:46:30 +00:00
parent 5e930ade02
commit 1462f98ae9
7 changed files with 39 additions and 13 deletions

View File

@@ -234,7 +234,14 @@ class TaskBoardHandler(
self.send_error(404)
else:
self.send_error(404)
elif self.path == '/echo/login' or self.path.startswith('/echo/login?'):
elif self.path in ('/', '/echo', '/echo/'):
self.send_response(302)
self.send_header('Location', '/echo/index.html')
self.send_header('Content-Length', '0')
self.end_headers()
return
elif self.path in ('/echo/login', '/login') or \
self.path.startswith(('/echo/login?', '/login?')):
# If already logged in, redirect to workspace; otherwise serve
# login.html (created in Lane B2).
if self._check_dashboard_cookie():
@@ -275,6 +282,12 @@ class TaskBoardHandler(
self.send_error(403)
return
if fpath.is_file():
if fpath.name != 'login.html' and not self._check_dashboard_cookie():
self.send_response(302)
self.send_header('Location', '/echo/login')
self.send_header('Content-Length', '0')
self.end_headers()
return
html = fpath.read_text('utf-8').replace('<!--NAV-->', NAV_HTML)
body = html.encode('utf-8')
self.send_response(200)