Gjermund Høsøien Wiggen
6263ce1332
feat: seed dashboard, fix My tickets filter
...
- Add demo dashboard with 7 widgets to seed script
- Dashboard is_default=true — appears as home page on fresh seed
- Add views/dashboards/dashboardWidgets to seed reset
- Fix My tickets: now filters by first non-system user (not any owner)
- Pass owner param in sidebar My tickets link
- Update page.tsx view=my to respect owner URL param
- Scrip engine already sorts by sort_order (verified)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-09 13:09:02 +02:00
Gjermund Høsøien Wiggen
c6c5272e50
feat: SQL filtering, Users admin tab, dashboard polish
...
- Move ticket filtering from in-memory to SQL WHERE clauses
(queue_id, status, owner use Drizzle eq/isNull; text search uses ilike;
custom field filters use EXISTS subqueries)
- Add limit param to GET /tickets
- Add POST/PATCH/DELETE /users routes
- Add Users tab to admin page with create/edit/delete
- Smart widget positioning in dashboard (3-column grid fill)
- Show pattern hint below CF inputs in New Ticket dialog
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-09 13:04:10 +02:00
Gjermund Høsøien Wiggen
7be90684fb
fix: replace broken add-filter button with stepped filter builder
...
- Fixed popover z-index: uses fixed positioning with z-50 above backdrop
- Stepped flow: select field → set operator (is/is_not) → choose/write value → Apply
- Removed old inline CF value inputs (handled inline in the new flow)
- Fixed filter persistence: clear filters when navigating away from saved view
- Fixed home redirect: check for default dashboard on load
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-09 11:30:17 +02:00
Gjermund Høsøien Wiggen
b70a133ea2
feat: add dashboards — tables, CRUD API, widget data endpoint
...
- New dashboards table (name, description, layout, is_default)
- New dashboard_widgets table (view_id, title, widget_type, position, config)
- GET/POST/PATCH/DELETE /dashboards
- GET/POST/PATCH/DELETE /dashboards/:id/widgets
- GET /dashboards/:id/widgets/:id/data — runs saved view filters,
returns pre-aggregated data for count/ticket_list/status_chart/grouped_counts
- is_default uniqueness enforced on PATCH
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-09 11:26:22 +02:00
Gjermund Høsøien Wiggen
aa90b88991
feat: add saved views — database table, CRUD API, migration
...
- New views table (id, name, filters jsonb, sort_key, is_public, creator_id)
- GET/POST/PATCH/DELETE /views endpoints
- Register views router in server
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-09 11:10:25 +02:00
Gjermund Høsøien Wiggen
aa808f1d3f
feat: return scrip results on ticket create, update frontend types
...
- POST /tickets now returns { ticket, scrip_results } matching PATCH pattern
- createTicket API function returns UpdateResult instead of Ticket
- Update call site to use data.ticket.id
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-09 10:51:14 +02:00
Gjermund Høsøien Wiggen
06cc7c79a3
feat: enhance frontend UI — command palette, admin redesign, API coverage
...
Types + API:
- Add User, TemplatePreview, QueueCustomField types
- Add getUsers, getTemplates, createTemplate, updateTemplate,
previewTemplate, updateQueue, updateLifecycle, updateCustomField API functions
UI:
- Command palette: keyboard-first navigation with fuzzy ticket search
- Admin: comprehensive redesign with tab-based layout (Queues, Lifecycles,
Scrips, Custom Fields, Templates, Users)
- Ticket list: improved inbox-style rows with quick actions
- Ticket detail: enhanced conversation thread and properties sidebar
- App shell: sidebar visual refinement with active indicator bar
- Theme toggle: smoother transitions
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-09 10:43:28 +02:00
Gjermund Høsøien Wiggen
04b4e28d21
Change ticket IDs from UUID to sequential integers
...
Backend:
- tickets.id: uuid → integer GENERATED ALWAYS AS IDENTITY
- transactions.ticket_id, custom_field_values.ticket_id: uuid → integer
- Routes convert string params to Number() for DB queries
- ScripEngine.prepare takes ticketId: number
- ActionPayload.ticketId: string → number
Frontend:
- Ticket.id: string → number, Transaction.ticket_id: string → number
- API functions accept number params
- formatTicketId() helper returns TKT-0001 format
- Ticket rows display TKT-XXXX, detail page uses formatTicketId
Migration: drops FKs, clears data, alters column types, re-adds FKs
2026-06-07 23:23:05 +02:00
Gjermund Høsøien Wiggen
7da52dfff6
Revert to single-column ticket list with inbox-style rows
...
- Remove three-column layout, inline detail panel, and properties sidebar
- Click a ticket navigates to /tickets/[id] via router.push
- Redesign TicketRow as inbox-style: status dot, bold subject on top line,
muted ID/queue/owner meta on second line, time right-aligned
- Cleaner visual hierarchy with increased padding and gap
2026-06-07 23:14:59 +02:00
Gjermund Høsøien Wiggen
86e00b076a
Add properties sidebar to inline ticket detail panel
...
- Two-column layout inside TicketDetailPanel: conversation (left) + sidebar (right)
- Status section: Select dropdown with all statuses, previewTicket + updateTicket flow with Apply/Cancel
- Assignment section: read-only assignee display with avatar initial
- Details section: queue name, created/updated/resolved dates
- Custom fields section: name:value pairs when present
- Sidebar skeleton during loading
- Fetches queue info alongside ticket data for display
2026-06-07 23:13:00 +02:00
Gjermund Høsøien Wiggen
88ab30a7fd
Fix transaction_type case mismatch in both ticket pages
...
Backend returns PascalCase (Create, StatusChange, SetOwner, Comment, Correspond).
Frontend was checking lowercase, causing transaction rendering to fall through to raw type strings.
2026-06-07 23:06:25 +02:00
Gjermund Høsøien Wiggen
737e8942f6
Redesign ticket list to three-column layout with proportional widths
...
- Replace Sheet slide-over with inline peer detail column
- List column: 40% width (min 360px) when ticket selected, flex-1 otherwise
- Detail column: 60% width (min 480px), slides in from right (300ms)
- Mobile: list hidden when ticket selected, detail becomes full-width
- Subtle border-r divider on list column
- Taller ticket rows (py-4) with smooth hover transitions
- width transition on list column resize
2026-06-07 23:00:45 +02:00
Gjermund Høsøien Wiggen
10962f795f
feat: three-column ticket list layout (list + detail as peers, no Sheet)
...
- Replace Sheet slide-over with persistent right-column detail panel
- Ticket list shrinks to w-80 when ticket selected, detail takes flex-1
- Animated transition (300ms ease-out) when selecting/deselecting
- Kept existing conversation thread, properties sidebar, reply box inline
2026-06-07 22:58:50 +02:00
Gjermund Høsøien Wiggen
784d30acbd
fix: wrap TicketListPage in Suspense boundary for useSearchParams
2026-06-07 22:46:34 +02:00
Gjermund Høsøien Wiggen
b2423f2821
feat: inbox-style ticket rows, Sheet detail slide-over, gradient New Ticket button
2026-06-07 22:34:27 +02:00
Gjermund Høsøien Wiggen
77860eb6c4
Redesign: Linear-inspired dark mode frontend
...
Complete rewrite of all pages:
- layout.tsx: App shell with 240px sidebar (saved views, queue list, admin link)
- app-shell.tsx: Client sidebar component with route highlighting + counts
- page.tsx: Sleek ticket list with filter chips (All/Open/In progress/Resolved), search bar, status dots, assignee avatars, skeleton loading
- tickets/[id]/page.tsx: Two-panel conversation layout — message thread (left) + properties sidebar (right) with status change, scrip preview, reply box
- admin/page.tsx: Suspense-wrapped admin with tabs in sheet panels
- command-palette.tsx: Cmd+K search with keyboard navigation
Design tokens from Linear:
- bg-[#08090a] canvas, bg-[#0f1011] panels, bg-[#191a1b] cards
- text-[#f7f8f8] primary, text-[#d0d6e0] secondary, text-[#8a8f98] tertiary
- borders: rgba(255,255,255,0.08) standard, rgba(255,255,255,0.05) subtle
- accent: #5e6ad2 primary, #7170ff interactive
- status colors: new=gray, open=indigo, in_progress=amber, resolved=green
- Inter font, weights 400/510/590, no pure white
Fixed: Suspense boundaries for useSearchParams in layout and admin pages
Build: passes with zero errors
2026-06-07 22:16:18 +02:00
Gjermund Høsøien Wiggen
a49e888011
Add ticket list page with filters, status badges, create dialog
2026-06-07 22:02:06 +02:00
Gjermund Høsøien Wiggen
9b1af0b7b3
Add Next.js + shadcn/ui scaffold with deps
...
- Next.js 15 App Router, TypeScript, Tailwind CSS
- shadcn/ui components: button, input, select, textarea, dialog, tabs, table, card, badge, label, separator, dropdown-menu, form, sheet, tooltip
- Runtime deps: @tanstack/react-table, zod, react-hook-form, @hookform/resolvers, lucide-react, date-fns
2026-06-07 21:55:54 +02:00