[dashboards] Kanban fixes — 1) reorder cards within columns, 2) add cards to full columns, 3) opaque modals to see task detail - #443
Conversation
|
Hey @kaizengrowth — welcome to Open Brain Source! 👋 Thanks for submitting your first PR. The automated review will run shortly and check things like metadata, folder structure, and README completeness. If anything needs fixing, the review comment will tell you exactly what. Once the automated checks pass, a human admin will review for quality and clarity. Expect a response within a few days. If you have questions, check out CONTRIBUTING.md or open an issue. |
OB1 PR Gate✅ Folder structure — All files are in allowed directories Result: All 15 checks passed! Ready for human review. Post-Merge TasksThese don't block merge — they're reminders for admins after this PR lands.
|
…ring Dropping a card onto another card passed the card's UUID as a status, so the update failed; full columns had no empty drop space and could not receive cards; and intra-column reordering was scaffolded (SortableContext/useSortable) but never handled in onDragEnd. handleDragEnd now resolves card drop targets to their column and insertion position, renumbers the column's importance values (99->1) so priority order persists via the existing field, and batches the apiUpdateKanban calls with an optimistic update that reverts on failure. groupByStatus sorts each column by importance so the order stays stable through optimistic updates. No schema or API changes.
69e817f to
b92f911
Compare
The Cloudflare deploy section linked to integrations/cloudflare-rest-worker, a directory that never existed; the link text and the commit that added it (ef8cf73) both refer to the open-brain-rest gateway. Point the link at integrations/open-brain-rest so the internal-links gate passes.
|
The internal-links gate failure was pre-existing on |
Cover the new drag interactions in the Workflow Board features list (drop on cards, intra-column reordering persisted via importance) and add a troubleshooting entry for reverted reorders.
bg-surface is a 4.5% white wash meant for cards sitting on the opaque page background. The kanban card modal, its delete confirmation, the DeleteModal, and the PriorityDot dropdown float over other content with nothing opaque behind them, so they rendered nearly transparent and were hard to read. Adds --color-bg-overlay (#2d302e), the opaque equivalent of the bg-elevated wash composited over bg-primary, and uses it on those four floating panels. Card/page surfaces are unchanged.
|
Added one more kanban UX fix (0da85a9): the card edit modal, its delete confirmation, |
Contribution Type
/recipes)/schemas)/dashboards)/integrations)/skills)What does this do?
Fixes four bugs in the Next.js dashboard's kanban board:
handleDragEndtreatedover.idas a status unconditionally, so dropping onto a card sent that card's UUID as thestatusand the update failed. Since full columns have no empty drop space, they effectively couldn't receive cards at all.SortableContext/useSortableare wired up in the column/card components, butonDragEndnever handled same-column drops.bg-surface, a 4.5% white wash designed for cards sitting on the opaque page background. Floating over the board with only a dimmed backdrop behind them, these panels were see-through and hard to read.The drag fix (
components/KanbanBoard.tsx):handleDragEndnow resolves a card drop target to its column and insertion position, renumbers that column'simportancevalues top-down (evenly spaced 99→1) so the order persists via the existing field, and batches theapiUpdateKanbancalls behind an optimistic update that reverts on any failure.groupByStatussorts each column byimportanceso order stays stable through optimistic updates. No schema or API changes — priority order rides on the existingimportancefield.The opacity fix (
app/globals.css+ 3 components): adds an opaque--color-bg-overlaytoken (#2d302e— the existingbg-elevatedwash composited overbg-primary, so the same intended color, just solid) and applies it to the four floating panels: the kanban card modal, its delete confirmation,DeleteModal, and thePriorityDotdropdown. Card and page surfaces are unchanged, andbg-elevateditself is untouched (it has ~31 usages that sit on opaque backgrounds).Also included:
metadata.jsonbumped to 1.1.1 with a freshupdateddate (author credit unchanged).integrations/cloudflare-rest-worker, which never existed; it now points tointegrations/open-brain-rest/(see PR comment for details).One trade-off to flag: a reorder in a long column fires one update request per repositioned card. Renumbering is already gated to only-changed cards (unchanged cards are skipped), which keeps this small in practice, but flagging it in case maintainers want a batch endpoint later.
Requirements
No new requirements — same stack as the existing dashboard (Next.js, @dnd-kit, existing
/api/kanban/updateroute). No new dependencies, env vars, or schema changes.Checklist
README.mdwith prerequisites, step-by-step instructions, and expected outcomemetadata.jsonhas all required fieldsValidated locally with
npx tsc --noEmit,npm run build, andnpm run lint— all clean.