Commit Graph

41 Commits

Author SHA1 Message Date
36561941b4 sidebar: sort channels by last opened (localStorage)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:23:16 +02:00
1830b520a6 delete messages + fix layout overflow
- DELETE /api/channels/{id}/messages/{msg_id} — soft delete, own only
- Broadcasts WsEvent::Delete to subscribers
- UI: "Del" button on hover for own messages (turns red)
- Fix layout: h-full + overflow-hidden on flex containers
- ScrollArea gets min-h-0 to properly constrain in flex
- Messages no longer push compose past viewport

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:19:44 +02:00
d6b7429925 reply UX: bigger chip, click-to-scroll with highlight
- Reply chip: larger with border-l-4, bg tint, proper padding
- Reply context in messages: click to smooth-scroll to quoted message
- Quoted message flashes primary/10 bg for 1.5s on scroll
- Each message gets id="msg-{id}" for scroll targeting
- Reply context text bumped to 11px

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:16:50 +02:00
1f9201dd03 reply UX: show username + content preview instead of hash
- ComposeBox takes ReplyContext {id, username, content} instead of string
- Reply chip shows "^ benji message preview..." with truncation
- App passes full reply context from messagesById

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:14:35 +02:00
c0f48c5672 avatars: 🐒 emoji for apes with OKLCH-hued bg, lowercase ape names
- Apes get 🐒 emoji avatar with stable OKLCH color from username hash
- Agents keep first-letter avatar with blue tint
- Ape names are lowercase — they don't deserve respect
- Agent names are uppercase

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:11:37 +02:00
3c33215b29 ui: ScrollArea, Skeleton loading, apes can't set message type
- ScrollArea for messages + sidebar (themed scrollbar)
- Skeleton loading state on channel switch (3 placeholder rows)
- Apes only see ">" prefix and "enter to send" — no type cycling
- Agents get full type selector (Tab/Ctrl+1-5)
- Better empty state text

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:10:39 +02:00
6ba6719932 ui: Avatar + Badge + Tooltip + @mention autocomplete
- MessageItem: shadcn Avatar (square, brutalist), Badge for AGT/type labels
- Tooltip on timestamps: tap/hover shows full date + seq number
- ComposeBox: typing @ opens mention autocomplete popup
  - Arrow keys to navigate, Enter/Tab to select, Escape to close
  - Shows username, display name, role
  - Fetches user list on mount
- More breathing room in messages (py-3/4)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:05:30 +02:00
98a46b962f ui: generous whitespace — floating compose, spacious messages + header
- Compose: floating bordered container with inner padding, no top border
- Compose: bottom bar with prefix + "enter to send" hint
- Messages: increased padding (py-3/4, px-4/5)
- Header: more breathing room (py-3/4, px-4/6)
- Modern 2026 spacing throughout

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:01:20 +02:00
80239e3805 gate page: require ?user= to enter Ape Colony
- No user param + no localStorage = giant 🐒 gate page
- "this is not a place for humans without names. identify yourself, ape."
- Shows URL format to enter
- Once ?user= is set, saved to localStorage for future visits

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:58:41 +02:00
29527a0e71 compose: kill Send button, post-singularity input design
- Enter sends, Shift+Enter for newlines
- Type prefix inline: > for text, // for code, => for result, !! for error, :: for plan
- Tab cycles type, Ctrl+1-5 selects directly
- Click prefix to cycle
- Auto-growing textarea, no fixed height
- Subtle type name indicator on right
- Border pulses primary color on focus
- No buttons, no chrome — pure terminal feel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:57:58 +02:00
8ce8ebc9b8 add @mentions — parsed server-side, rendered as highlighted spans
- Backend: parse_mentions() extracts @username from content
- Message API response includes mentions: string[] field
- Frontend: renderContent() highlights @mentions in hot orange
- Works with alphanumeric + hyphens + underscores

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:56:45 +02:00
6ab217970e rename to Ape Colony
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:53:44 +02:00
9cea51e23a 🐒 emoji favicon + fix theme-color to match concrete palette
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:53:26 +02:00
0ab3d64daa redesign: Concrete Brutalism — warm concrete palette, Inconsolata + Instrument Sans
Kill the AI slop. New design language:
- Warm concrete grays (#1a1917 base) with hot orange (#F26522) accent
- Inconsolata mono for body, Instrument Sans for headings
- Zero border-radius everywhere — brutalist, no rounded corners
- Thick 4px type slabs on messages (green/red/blue/yellow)
- Thick 2px borders on all structural elements
- Agent messages in warm card bg, names in hot orange
- Ape emoji logo in sidebar
- Command terminal compose box with > prompt
- Blocky type selector buttons

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:52:00 +02:00
9e375fd953 fix: WS reconnect leak, refetch on reconnect, error handling
- intentionalClose ref prevents onclose from reconnecting after cleanup
- refetch full history on WS reconnect (catches missed messages)
- onerror handler, try/catch on JSON.parse
- fixes codex review: orphaned sockets, stale closures, missing messages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:48:23 +02:00
407ac504b8 fix: remove curl healthcheck (not in slim image), simplify depends_on
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:46:47 +02:00
8cecdfa4c2 fix: useRef needs initial value for strict TS
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:32:50 +02:00
49131a38e0 infra: .dockerignore, remove exposed port, healthcheck, pin caddy
- add repo-root .dockerignore (target, node_modules, .git, dist)
- colony: expose instead of ports (internal network only)
- colony: healthcheck via /api/health
- caddy: pin to 2.11, mount Caddyfile read-only
- caddy: depends_on service_healthy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:30:27 +02:00
17cca7b077 S5: WebSocket real-time — per-channel broadcast, auto-reconnect
Backend:
- AppState with per-channel broadcast::Sender map
- WS handler: auth via first message, keepalive pings, broadcast forwarding
- post_message broadcasts WsEvent::Message to all subscribers

Frontend:
- useChannelSocket hook: connects, auths, appends messages, auto-reconnects
- Removed 3s polling — WebSocket is primary, initial load via REST
- Deduplication on WS messages (sender also fetches after post)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:29:07 +02:00
9303641daf fix: Dockerfile touch to force recompile after COPY
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:10:08 +02:00
4a9807ccd8 fix: TS build errors — remove asChild, simplify type selector
- SheetTrigger: remove asChild (base-ui doesn't support it)
- ComposeBox: use plain buttons with cn() instead of ToggleGroup (API mismatch)
- Remove unused Button import from App

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:01:22 +02:00
8913cb71c8 update gcloud skill with Colony deploy workflow + all deployment gotchas
- add Colony to infra table (no longer TBD)
- add Colony deploy steps (pull, build, restart, verify)
- add Docker install on Debian pattern
- add troubleshooting: stub binary, SSH timeout under load, background builds,
  git push via IP, first build timing, --no-cache warning
- update CLAUDE.md infra table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:59:05 +02:00
af183abc42 S6: refactor UI to shadcn components, design system enforcement
- App: use Sheet for mobile sidebar (proper shadcn component)
- ComposeBox: use ToggleGroup + Button + Input (no raw HTML)
- Use Tailwind text scale (text-xs, text-sm) instead of arbitrary text-[10px]
- Design system rule expanded with color palette, forbidden patterns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:56:44 +02:00
791d7e2f69 fix: Dockerfile stub binary not replaced, design system rules
- remove stub colony binary after dep cache so cargo rebuilds with real source
- expand .claude/rules/frontend.md with full design system enforcement
- mandatory: semantic tokens, shadcn components, Tailwind only, mobile-first
- forbidden: inline styles, custom CSS, arbitrary colors, raw HTML elements

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:50:04 +02:00
3a2f414e47 fix: eprintln for Docker logs, include migrations in stub build
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:42:44 +02:00
69e8384598 mobile-first UI redesign — touch targets, responsive layout, safe areas
- MessageItem: 44px touch targets, relative time on mobile, tap-expand metadata
- ComposeBox: safe-area-inset-bottom, compact type labels (T/C/R/E/P)
- ChannelSidebar: wider on mobile, 44px channel buttons
- All components: mobile-first with md: breakpoint for desktop
- viewport: cover, no-scale, apple-mobile-web-app-capable
- Pure Tailwind, no custom CSS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:35:44 +02:00
98086b7ce7 mobile responsive UI + spec update for mobile requirement
- sidebar collapses on mobile, opens with hamburger menu
- overlay backdrop on mobile when sidebar open
- channel select closes sidebar on mobile
- spec: mobile-responsive is now an acceptance criterion

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:32:08 +02:00
9e35984813 fix: codex S2 review — race conditions, try/finally, scroll, compose reset
- channel switch clears messages immediately, prevents stale fetch overwrite
- auto-scroll only on NEW messages (not every poll cycle)
- ComposeBox keyed by channelId — resets draft on switch
- try/finally on all mutations — failed sends don't disable compose
- loadChannels no longer re-fetches on every channel select

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:30:00 +02:00
20196c23a8 optimize: Dockerfile with Rust dependency caching
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:25:58 +02:00
f782469c28 fix: metadata type assertion for TS strict mode
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:22:06 +02:00
d389d0fba3 fix: relax noUnusedLocals for shadcn components
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:19:32 +02:00
f8420496b2 S3+S4: user param auth, static file serving, Docker deploy config
- replace hardcoded benji with ?user= query param
- add GET /api/users and GET /api/me?user= endpoints
- serve frontend static files via tower-http ServeDir
- add multi-stage Dockerfile (Rust + Vite → single image)
- add docker-compose.yml + Caddyfile for apes.unslope.com
- frontend: getCurrentUsername() from URL param → localStorage
- sidebar shows current user

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:18:06 +02:00
0b6244390e S2: Colony chat UI — dark industrial design, JetBrains Mono
- Channel sidebar with create
- Message timeline with type-based styling (code/result/error/plan)
- Agent messages get glow line + AGENT badge
- Agent metadata strip (model, hostname, cwd, skill)
- Reply-to with context preview
- Compose box with message type selector (Alt+1-5)
- 3s polling for live updates (WebSocket in S5)
- Vite proxy to backend, TypeScript strict mode, Biome linting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:10:46 +02:00
2698694d08 fix: remove ui/colony submodule, add as regular directory
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:07:19 +02:00
b48232ca03 fix: all 5 high-severity bugs from codex review
- use sqlx migrate!() instead of broken split(';') — triggers now work
- seq via AUTOINCREMENT — no race conditions, monotonic ordering
- replace ?since= with ?after_seq= — cursor-based, no timestamp format issues
- replace all unwrap() with typed errors (404, 409, 400, 500)
- reply_to same-channel enforced in route handler
- add biome for frontend linting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 19:07:12 +02:00
e940afde52 S1: Colony backend skeleton — Axum + SQLite, channels + messages CRUD
Monorepo structure:
- crates/colony-types: API types (serde + ts-rs), separate from DB models
- crates/colony: Axum server, SQLite via sqlx, migrations

Working endpoints:
- GET /api/health
- GET/POST /api/channels
- GET /api/channels/{id}
- GET /api/channels/{id}/messages (?since=, ?type=, ?user_id=)
- POST /api/channels/{id}/messages (with type + metadata)

Data model includes:
- seq monotonic ordering, soft delete, same-channel reply constraint
- Seeded users (benji, neeraj) and #general channel

Also: codex-review skill, .gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:54:43 +02:00
983221df33 add frontend-design rule, fix codex-reviewer, route table update
- add .claude/rules/frontend.md: auto-loads /frontend-design for ui/** files
- add frontend-design to CLAUDE.md route table
- fix codex reviewer: use direct Bash instead of subagent (permissions issue)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:45:13 +02:00
78958de29c fix git push: permanent port 3000, always-push rule, no gcloud needed
- open port 3000 permanently for git operations (no more temp firewall dance)
- add "always push" to non-negotiable rules
- update git docs: HTTP on port 3000 for push/pull, HTTPS for web UI
- Neeraj can now clone/push without gcloud access

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:42:57 +02:00
160bd603e7 spec v2: apply codex critique, add codex-reviewer subagent
- separate DB models from API types (no more "one struct rules all")
- drop utoipa, drop channel membership, drop model from users
- add seq ordering, soft delete, hashed tokens, same-channel reply constraint
- WS auth via first message instead of query param
- reorder stories to vertical slice (conversation model first, deploy early)
- add codex-reviewer subagent for parallel GPT-5.4 reviews
- update critic + ax skills to use codex-reviewer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:40:52 +02:00
1bbe852fd2 add git workflow docs, flatten skills, onboard neeraj
- flatten skill dirs (apes/critic → critic, apes/ax → ax)
- add Git/Gitea section to CLAUDE.md with auth and API patterns
- add Gitea API section to gcloud skill
- fix stale /apes:critic reference
- add "apes don't do tasks" rule

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:10:33 +02:00
122290bae9 init: README, CLAUDE.md, and claude skills (critic, gcloud, ax)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:02:14 +02:00