Commit Graph

5 Commits

Author SHA1 Message Date
user
7361e8bd9b refactor: merge /me + /channels into /state, unify message endpoints
- HandleState returns user info (id, nick) + joined channels in one response
- HandleGetMessages now serves unified message stream (was HandlePoll)
- HandleSendMessage accepts 'to' field for routing to #channel or nick
- HandleGetHistory supports scrollback for channels and DMs
- Remove separate HandleMe, HandleListChannels, HandleSendDM, HandleGetDMs, HandlePoll
2026-02-10 10:20:00 -08:00
user
ac933d07d2 Add embedded web chat client with C2S HTTP API
- New DB schema: users, channel_members, messages tables (migration 003)
- Full C2S HTTP API: register, channels, messages, DMs, polling
- Preact SPA embedded via embed.FS, served at GET /
- IRC-style UI: tab bar, channel messages, user list, DM tabs, /commands
- Dark theme, responsive, esbuild-bundled (~19KB)
- Polling-based message delivery (1.5s interval)
- Commands: /join, /part, /msg, /nick
2026-02-10 09:22:22 -08:00
clawbot
6a108749a1 Fix all lint issues and update AGENTS.md workflow rules
- Fix stuttering type names (e.g. config.ConfigParams → config.Params)
- Add doc comments to all exported types/functions/methods
- Add package doc comments to all packages
- Fix JSON tags to camelCase
- Extract magic numbers to constants
- Add blank lines per nlreturn/wsl_v5 rules
- Use errors.Is() for error comparison
- Unexport NewLoggingResponseWriter (not used externally)
- Replace for-range on ctx.Done() with channel receive
- Rename unused parameters to _
- AGENTS.md: all changes via feature branches, no direct main commits
2026-02-09 12:33:08 -08:00
clawbot
7b0ff178d4 AGENTS.md: no direct commits to main, all changes via feature branches 2026-02-09 12:31:14 -08:00
clawbot
8bb083a7f8 Add project scaffolding with fx DI, SQLite migrations, and healthcheck
- go.mod with git.eeqj.de/sneak/chat module
- internal packages: globals, logger, config, db, healthcheck, middleware, handlers, server
- SQLite database with embedded migration system (schema_migrations tracking)
- Migration 001: schema_migrations table
- Migration 002: channels table
- Config with chat-specific vars (MAX_HISTORY, SESSION_TIMEOUT, MAX_MESSAGE_SIZE, MOTD, SERVER_NAME, FEDERATION_KEY)
- Healthcheck endpoint at /.well-known/healthcheck.json
- Makefile, .gitignore
- cmd/chatd/main.go entry point
2026-02-09 12:22:28 -08:00