Skip to content

Refactor bot settings UI, add SEO metadata, security hardening, and bot runtime#7

Merged
nathanialhenniges merged 21 commits intomainfrom
feature/bot-settings-refactor-and-seo
Mar 18, 2026
Merged

Refactor bot settings UI, add SEO metadata, security hardening, and bot runtime#7
nathanialhenniges merged 21 commits intomainfrom
feature/bot-settings-refactor-and-seo

Conversation

@nathanialhenniges
Copy link
Copy Markdown
Member

Summary

  • Migrated to Bun/Drizzle, added Twitch bot runtime with active task state tracking, and refactored bot settings layout into a two-column responsive design
  • Added SEO metadata, security hardening, test coverage (timer logic, config round-trips, event emitter), and deployment docs
  • Added !dwhelp/!dwcommands bot commands, blur-to-reveal overlay URL toggle, and cursor feedback on disabled UI elements

Test plan

  • Bot settings page renders correctly in both single-column (mobile) and two-column (desktop) layouts
  • Bot account connection flow works end-to-end (authorize → callback → toast feedback)
  • !dwhelp and !dwcommands bot commands respond correctly in Twitch chat
  • Overlay URLs are hidden by default and revealed on click
  • All Vitest unit tests pass (bun run test)
  • TypeScript type checking passes (bun run check-types)

🤖 Generated with Claude Code

nathanialhenniges and others added 21 commits February 14, 2026 10:44
- Add LICENSE file (MIT)
- Use next/link for Privacy Policy and Terms of Service links in docs
  footer so basePath is prepended correctly on GitHub Pages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable the Sponsor button on the repository by adding FUNDING.yml
with the nathanialhenniges GitHub Sponsors profile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tings

DW-2: Configure GitHub repo settings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Nixpacks with Dockerfile-based builds to fix Coolify deployment
failures caused by missing DATABASE_URL during build. Unify Prisma config
to use process.env with fallback, and make migrations non-fatal so the
app starts even if the database isn't immediately reachable.

- Switch Dockerfile base to node:24-alpine with pnpm cache mounts
- Delete nixpacks.toml (no longer needed)
- Merge prisma.docker.config.ts into prisma.config.ts using process.env fallback
- Copy full packages/db into production image for Prisma auto-discovery
- Update entrypoint: cd into packages/db, use npx, non-fatal migrations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…timer controls

Replace disabled:pointer-events-none with disabled:cursor-not-allowed on input, button, and select primitives so users see a not-allowed cursor on disabled fields. Add data-disabled:cursor-not-allowed to slider. Extract TimerProvider context and show "Stop the timer to change settings" hint when timer is running. Includes dashboard layout, theme center, and bot settings refinements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Overlay tokens are now blurred by default to prevent accidental exposure.
A single Eye/EyeOff toggle in the card header reveals both URLs. Copy
button works regardless of blur state since it reads from the variable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace overlay URL blur with password field toggle
- Add scrollable task list (max-h-400px) on dashboard
- Add missing style editor controls (task border width, checkbox margins)
- Implement active task status with auto-activation and glow animation
- Add Twitch bot service with twurple (chat connect, command handling, ban/timeout)
- Add bot commands: task (!task, !done, !edit, !remove, !focus, !check, !next, !help, !clear) and timer (!timer start/pause/resume/skip/reset/eta)
- Add bot tRPC router (status/start/stop) with dashboard status pill and controls
- Auto-start bot on server boot via Next.js instrumentation
- Stop bot on disconnect, reload config on settings save
- Update OAuth scopes to include channel:moderate and user:read:chat

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite chat-commands.mdx to match actual bot implementation (fix !clear
subcommands, add !focus, correct !edit/!remove signatures, update timer
commands). Add DOCS_URL optional env var so the bot can link viewers to
the commands reference page. Add always-enabled !dwhelp and !dwcommands
meta-commands that respond with the docs link or an inline summary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…yout

- Replace pnpm/Prisma with Bun workspaces and Drizzle ORM (schema-as-code)
- Add Twitch bot runtime with active task state and !dwhelp/!dwcommands commands
- Refactor bot settings page: combine toggle cards, tabbed message editors, full-width commands reference
- Update CI/CD workflows, Dockerfile, and docker-entrypoint for Bun-based build
- Update docs (deployment, troubleshooting) and README

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consolidate bot settings components by extracting BotMessagesCard,
inlining command alias and variable reference into commands-reference,
and removing unused checkbox component. Add unit tests for bot command
parsing and matching logic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Enforce ALLOWED_TWITCH_IDS allowlist on account creation (was defined but never checked)
- Restrict timer.transition status to enum instead of arbitrary string
- Add length/count limits to command alias input validation
- Revoke Twitch token on bot disconnect before deleting row
- Add security headers (HSTS, X-Content-Type-Options, X-Frame-Options, etc.)
- Add router tests for task, timer, user, overlay, and config aliases (90 new tests)
- Add auth allowlist parsing tests and expand bot command tests
- Add nixpacks.toml for Coolify deployment and CONTRIBUTING.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Major UI refactor for bot settings using Tabs and improved command reference
- Add full SEO metadata, keywords, and OpenGraph/Twitter tags
- Add SVG logo and branding updates (DireWork)
- Integrate custom @dirework/api/logger across workspace
- Add unique constraints to overlay tokens and provider account IDs in schema
- Clean up redundant CSS and enhance Drizzle configuration
- Add migration for schema updates
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 18, 2026

Warning

Rate limit exceeded

@nathanialhenniges has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 21 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a3189f1b-5c9c-430c-9e80-ced12cec83f8

📥 Commits

Reviewing files that changed from the base of the PR and between d0a25c2 and 2810f0e.

⛔ Files ignored due to path filters (5)
  • apps/web/public/logo.svg is excluded by !**/*.svg
  • apps/web/src/app/favicon.ico is excluded by !**/*.ico
  • apps/web/src/app/icon.svg is excluded by !**/*.svg
  • bun.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (93)
  • .env.example
  • .github/FUNDING.yml
  • .github/workflows/ci.yml
  • .github/workflows/deploy-docs-to-pages.yml
  • .npmrc
  • CLAUDE.md
  • CONTRIBUTING.md
  • Dockerfile
  • GEMINI.md
  • README.md
  • apps/fumadocs/content/docs/chat-commands.mdx
  • apps/fumadocs/content/docs/deployment.mdx
  • apps/fumadocs/content/docs/troubleshooting.mdx
  • apps/fumadocs/src/app/global.css
  • apps/web/instrumentation.ts
  • apps/web/next.config.ts
  • apps/web/package.json
  • apps/web/src/app/(app)/api/bot/authorize/route.ts
  • apps/web/src/app/(app)/api/bot/callback/twitch/route.ts
  • apps/web/src/app/(app)/dashboard/bot/bot-settings-page.tsx
  • apps/web/src/app/(app)/dashboard/dashboard.tsx
  • apps/web/src/app/(app)/dashboard/styles/styles-page.tsx
  • apps/web/src/app/layout.tsx
  • apps/web/src/app/opengraph-image.tsx
  • apps/web/src/components/bot-settings/bot-messages-card.tsx
  • apps/web/src/components/bot-settings/command-alias-editor.tsx
  • apps/web/src/components/bot-settings/commands-reference.tsx
  • apps/web/src/components/bot-settings/message-editor.tsx
  • apps/web/src/components/bot-settings/variable-reference.tsx
  • apps/web/src/components/header.tsx
  • apps/web/src/components/mode-toggle.tsx
  • apps/web/src/components/task-list-display.tsx
  • apps/web/src/components/task-manager.tsx
  • apps/web/src/components/theme-center/color-input.tsx
  • apps/web/src/components/theme-center/font-select.tsx
  • apps/web/src/components/theme-center/style-preview-panel.tsx
  • apps/web/src/components/theme-center/task-style-editor.tsx
  • apps/web/src/components/theme-center/timer-style-editor.tsx
  • apps/web/src/components/timer-controls.tsx
  • apps/web/src/components/ui/button.tsx
  • apps/web/src/components/ui/checkbox.tsx
  • apps/web/src/components/ui/input.tsx
  • apps/web/src/components/ui/slider.tsx
  • apps/web/src/index.css
  • docker-entrypoint.sh
  • nixpacks.toml
  • package.json
  • packages/api/package.json
  • packages/api/src/bot/__tests__/commands.test.ts
  • packages/api/src/bot/commands.ts
  • packages/api/src/bot/index.ts
  • packages/api/src/context.ts
  • packages/api/src/events.ts
  • packages/api/src/logger.ts
  • packages/api/src/routers/__tests__/config-aliases.test.ts
  • packages/api/src/routers/__tests__/overlay.test.ts
  • packages/api/src/routers/__tests__/task.test.ts
  • packages/api/src/routers/__tests__/timer.test.ts
  • packages/api/src/routers/__tests__/user.test.ts
  • packages/api/src/routers/bot.ts
  • packages/api/src/routers/config.ts
  • packages/api/src/routers/index.ts
  • packages/api/src/routers/overlay.ts
  • packages/api/src/routers/task.ts
  • packages/api/src/routers/timer.ts
  • packages/api/src/routers/user.ts
  • packages/api/vitest.config.ts
  • packages/auth/package.json
  • packages/auth/src/__tests__/allowlist.test.ts
  • packages/auth/src/index.ts
  • packages/auth/vitest.config.ts
  • packages/db/drizzle.config.ts
  • packages/db/drizzle/0000_wooden_zarek.sql
  • packages/db/drizzle/0001_pretty_jocasta.sql
  • packages/db/drizzle/meta/0000_snapshot.json
  • packages/db/drizzle/meta/0001_snapshot.json
  • packages/db/drizzle/meta/_journal.json
  • packages/db/package.json
  • packages/db/prisma.config.ts
  • packages/db/prisma/migrations/0001_init/migration.sql
  • packages/db/prisma/migrations/0002_bot_settings_overhaul/migration.sql
  • packages/db/prisma/migrations/migration_lock.toml
  • packages/db/prisma/schema/app.prisma
  • packages/db/prisma/schema/auth.prisma
  • packages/db/prisma/schema/schema.prisma
  • packages/db/src/index.ts
  • packages/db/src/migrate.ts
  • packages/db/src/schema/app.ts
  • packages/db/src/schema/auth.ts
  • packages/db/src/schema/index.ts
  • packages/env/package.json
  • packages/env/src/server.ts
  • pnpm-workspace.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/bot-settings-refactor-and-seo
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nathanialhenniges nathanialhenniges merged commit 992f7d5 into main Mar 18, 2026
3 checks passed
@nathanialhenniges nathanialhenniges deleted the feature/bot-settings-refactor-and-seo branch March 26, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant