* feat(api): add webhook CRUD API router and tests
Add tRPC router for managing workspace webhooks:
- list, create, update, delete endpoints (admin role required)
- test endpoint to send a synthetic payload to a webhook URL
- URL validation, event subscription filtering
- Unit tests for all router procedures
- Integration tests with PGlite test database
- Add vitest config and test infrastructure for API package
Depends on #391 (DB schema & repository).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(api): use assertPermission instead of assertUserInWorkspace
Replace assertUserInWorkspace with assertPermission("workspace:manage")
per project conventions. The permissions system is the preferred
authorization approach for new code.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(api): use @kan/db alias instead of relative imports in tests
Replace relative path imports (../../db/src/...) with the @kan/db
alias configured in vitest.config.ts for consistency and robustness.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(api): use webhookUrlSchema in router input validation
Cherry-pick router-related changes from b2cc9ac:
- Use extracted webhookUrlSchema zod validator in create/update
input schemas for consistent SSRF checks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(api): replace dynamic import with static import for webhook utility
Add packages/api/src/utils/webhook.ts with sendWebhookToUrl,
createCardWebhookPayload, and webhookUrlSchema. Replace the dynamic
import() in the test endpoint with a static import at the top of the
file for better tree-shaking, type-checking, and readability.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(api): align sendWebhooksForWorkspace tests with merged PR #392
The merged delivery utility uses client-side event filtering
(getActiveByWorkspaceId takes 2 args, not 3). Update test assertions
to match the actual implementation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(web): add webhook management UI
Add settings page for managing workspace webhooks:
- Add webhooks page route and settings navigation link
- Add webhook list view with status toggles and action menus
- Add create/edit modal with URL validation and event selection
- Add delete confirmation dialog
- Add WEBHOOKS_ENABLED env flag for feature gating
Depends on #393 (CRUD API router).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(web): remove dead env vars, extract TableRow, import webhookEvents
- Remove unused WEBHOOK_URL and WEBHOOK_SECRET env vars (leftovers
from earlier env-var-based design)
- Move TableRow component outside WebhookList to avoid re-creation
on every render
- Import webhookEvents from @kan/db/schema instead of hardcoding
- Simplify formatDate to only handle Date objects (strings are not
returned by tRPC/Superjson)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(web): gate webhooks settings tab to admin role
The webhook API requires admin role, but the settings tab was visible
to all users (condition: true). Now matches the API's authorization
requirement, addressing reviewer feedback on PR #394.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(web): use webhookEvents constant for form defaults
Replace hardcoded event arrays with [...webhookEvents] in
NewWebhookModal so default values stay in sync if new events
are added to the schema.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(web): use date-fns with locale for webhook date formatting
Replace hardcoded toLocaleDateString('en-US') with date-fns format()
using the useLocalisation() hook's dateLocale, matching the pattern
used throughout the codebase (ActivityList, DateSelector, etc.).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: setup schema for workspace roles
* chore: regen migration
* feat: add publicId to workspace roles
* feat: setup default permissions
* feat: add repo funcs
* feat: setup basic router interactions
* feat: add card permissions
* feat: assert permissions for lists
* feat: assert board permissions
* feat: assert permission for remaining routes
* feat: add permissions page to settings
* feat: enable updating member roles
* feat: order members by role and createdAt
* feat: allow editing individual permissions
* feat: reset role defaults
* feat: clear all permission overrides
* feat: allow users to delete entities they have created
* feat: set roleId when inviting new members
* feat: disable UI elements if user does not have permissions
* feat: allow admins to assign the admin role to other users
* feat: allow delete:list as default
* refactor: centre permissions modal
* chore: translations
* refactor: reorganize settings page with tabbed interface
* feat: revamp API key management with new list view and confirmation modals
* refactor: update tab styling
* refactor: tweak UI/UX for managing API keys
* refactor: only show update button when change has been made
* refactor: only show update button when content of display name has been updated
* feat: store tab state in params
* refactor: remove focus state from tabs
* refactor: tweak styling on mobile select
* refactor: simplify settings pages
* feat: open upgrade modal if upgrade=pro is in params
* feat: add scroll to api key list on mobile
* chore: add translations
---------
Co-authored-by: Henry <henry_ball@hotmail.co.uk>
* feat: add patterned background to boards
* feat: setup dashboard 2.0
* fix: prevent patterned background from overlaying buttons
* feat: set max width for main card view
* feat: adjust colour scheme for card view
* feat: adjust dashboard border colour scheme and radius
* fix: use correct colour for description placeholder
* fix: use getLayout to persist layout state across pages
* feat: reduce max width for settings and members pages
* feat: add feedback button and modal
* feat: adjust page max width
* feat: extend mobile layout support
* fix: hide pro badge when collapsed
* feat: tweak nav styling for light mode
* feat: tweak skeleton loaders for board list
* feat: extend list max height
* fix: hide side nav right border on desktop
* chore: update hero images
* chore: update hero images for docs
* chore: update translations
* feat: implement Trello integration with OAuth and user fields
* feat: migrate Trello integration to new integrations table
* refactor: migrate Trello integration to use new integration system
* refactor: migrate Trello integration to use new integrations table
* fix: add loading check for Trello integration and update VSCode settings
* feat: enhance import boards UI with dynamic integration providers and local storage config
* feat: add select/unselect all buttons and loading state to board import form
* feat: add Trello import env vars on README
* docs: update Trello import guide to use OAuth flow instead of API keys
* feat: add integrations table for OAuth token management
* feat: connect trello from import modal
* refactor: consolidate Trello integration endpoints into unified integration router
* fix: trello import again
* refactor: generalize integration authorization flow and improve error handling
* refactor: update Trello API endpoints and tags for better organization
* feat: add Integrations tag to OpenAPI specification
* refactor: update Trello auth endpoint to use generic integration provider param
* refactor: move Trello integration logic from trello.ts to import.ts router
* refactor: consolidate Trello integration endpoints and fix API URL
* chore: remove debug logs
---------
Co-authored-by: Henry <henry_ball@hotmail.co.uk>