fix: chat WS relay URL + chat UX improvements

- Fix docker-compose to read GATEWAY_WS_URL (was VITE_WS_URL, never set)
- Fix gateway-relay.ts default to ws.hammer.donovankelly.xyz
- Fix Elysia TS errors in error handlers (cast to any)
- Add thinking/typing indicator in chat (bouncing dots)
- Add message timestamps (tap to show)
- Add thread renaming (double-click thread name)
- Auto-resize chat input textarea
This commit is contained in:
2026-01-29 08:34:45 +00:00
parent 0f084704ee
commit 819649c8c7
7 changed files with 126 additions and 31 deletions

View File

@@ -140,7 +140,7 @@ const app = new Elysia()
.get("/health", () => ({ status: "ok", service: "hammer-queue" }))
.onError(({ error, set }) => {
const msg = error?.message || String(error);
const msg = (error as any)?.message || String(error);
if (msg === "Unauthorized") {
set.status = 401;
return { error: "Unauthorized" };

View File

@@ -10,8 +10,8 @@
* (BetterAuth) (relay) (token auth)
*/
const GATEWAY_URL = process.env.GATEWAY_WS_URL || process.env.VITE_WS_URL || "wss://hammer.donovankelly.xyz";
const GATEWAY_TOKEN = process.env.GATEWAY_WS_TOKEN || process.env.VITE_WS_TOKEN || "";
const GATEWAY_URL = process.env.GATEWAY_WS_URL || "wss://ws.hammer.donovankelly.xyz";
const GATEWAY_TOKEN = process.env.GATEWAY_WS_TOKEN || "";
type GatewayState = "disconnected" | "connecting" | "connected";
type MessageHandler = (msg: any) => void;

View File

@@ -19,7 +19,7 @@ async function requireAdmin(request: Request, headers: Record<string, string | u
export const adminRoutes = new Elysia({ prefix: "/api/admin" })
.onError(({ error, set }) => {
const msg = error?.message || String(error);
const msg = (error as any)?.message || String(error);
if (msg === "Unauthorized") {
set.status = 401;
return { error: "Unauthorized" };

View File

@@ -21,7 +21,7 @@ async function requireSessionOrBearer(
export const projectRoutes = new Elysia({ prefix: "/api/projects" })
.onError(({ error, set }) => {
const msg = error?.message || String(error);
const msg = (error as any)?.message || String(error);
if (msg === "Unauthorized") {
set.status = 401;
return { error: "Unauthorized" };

View File

@@ -104,7 +104,7 @@ async function resolveTask(idOrNumber: string) {
export const taskRoutes = new Elysia({ prefix: "/api/tasks" })
.onError(({ error, set }) => {
const msg = error?.message || String(error);
const msg = (error as any)?.message || String(error);
if (msg === "Unauthorized") {
set.status = 401;
return { error: "Unauthorized" };