Skip to content

[dashboards] Kanban fixes — 1) reorder cards within columns, 2) add cards to full columns, 3) opaque modals to see task detail - #443

Open
kaizengrowth wants to merge 5 commits into
NateBJones-Projects:mainfrom
kaizengrowth:contrib/kaizengrowth/kanban-drag-fixes
Open

[dashboards] Kanban fixes — 1) reorder cards within columns, 2) add cards to full columns, 3) opaque modals to see task detail#443
kaizengrowth wants to merge 5 commits into
NateBJones-Projects:mainfrom
kaizengrowth:contrib/kaizengrowth/kanban-drag-fixes

Conversation

@kaizengrowth

@kaizengrowth kaizengrowth commented Jul 13, 2026

Copy link
Copy Markdown

Contribution Type

  • Recipe (/recipes)
  • Schema (/schemas)
  • Dashboard (/dashboards)
  • Integration (/integrations)
  • Skill (/skills)
  • Repo improvement (docs, CI, templates)

What does this do?

Fixes four bugs in the Next.js dashboard's kanban board:

  1. Dropping a card onto another card fails. handleDragEnd treated over.id as a status unconditionally, so dropping onto a card sent that card's UUID as the status and the update failed. Since full columns have no empty drop space, they effectively couldn't receive cards at all.
  2. Intra-column reordering was scaffolded but never worked. SortableContext/useSortable are wired up in the column/card components, but onDragEnd never handled same-column drops.
  3. Column order wasn't stable. Cards rendered in fetch order, so any persisted priority wasn't reflected.
  4. The card edit modal was nearly transparent. The modal (and the delete dialogs and priority dropdown) used 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): handleDragEnd now resolves a card drop target to its column and insertion position, renumbers that column's importance values top-down (evenly spaced 99→1) so the order persists via the existing field, and batches the apiUpdateKanban calls behind an optimistic update that reverts on any failure. groupByStatus sorts each column by importance so order stays stable through optimistic updates. No schema or API changes — priority order rides on the existing importance field.

The opacity fix (app/globals.css + 3 components): adds an opaque --color-bg-overlay token (#2d302e — the existing bg-elevated wash composited over bg-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 the PriorityDot dropdown. Card and page surfaces are unchanged, and bg-elevated itself is untouched (it has ~31 usages that sit on opaque backgrounds).

Also included:

  • README updated: Workflow Board features now document drop-on-card and intra-column reordering, plus a new troubleshooting entry for reverted reorders. (The README already had the required What It Does / Prerequisites / Steps / Expected Outcome / Troubleshooting sections.)
  • metadata.json bumped to 1.1.1 with a fresh updated date (author credit unchanged).
  • One pre-existing repo-wide gate failure fixed: the README's Cloudflare deploy section linked to integrations/cloudflare-rest-worker, which never existed; it now points to integrations/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/update route). No new dependencies, env vars, or schema changes.

Checklist

  • I've read CONTRIBUTING.md
  • My contribution has a README.md with prerequisites, step-by-step instructions, and expected outcome
  • My metadata.json has all required fields
  • If my contribution depends on a skill or primitive, I declared it in metadata.json and linked it in the README — N/A, no skill/primitive dependencies
  • I tested this on my own Open Brain instance
  • No credentials, API keys, or secrets are included

Validated locally with npx tsc --noEmit, npm run build, and npm run lint — all clean.

@github-actions github-actions Bot added the dashboard Contribution: frontend template label Jul 13, 2026
@github-actions

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

OB1 PR Gate

Folder structure — All files are in allowed directories
Required files — README.md and metadata.json found in all contribution folders
Metadata valid — All metadata.json files passed JSON Schema validation
No credentials — No API keys, tokens, or secrets detected
SQL safety — No destructive SQL or core table modifications
Category artifacts — Required file types present for each category
PR format — Title follows [category] Description format
No binary blobs — No oversized or binary files
README completeness — All READMEs include Prerequisites, Steps, and Expected Outcome
Contribution dependencies — All declared skill and primitive dependencies exist and are linked in README
LLM clarity review — Covered by Claude PR Review workflow
Remote MCP pattern — No local MCP server patterns detected — uses remote MCP correctly
Tool audit link — Extensions/integrations link to the MCP Tool Audit guide
Scope check — All changes are within the contribution folder(s)
Internal links — All relative links in READMEs resolve to existing files

Result: All 15 checks passed! Ready for human review.


Post-Merge Tasks

These 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.
@kaizengrowth
kaizengrowth force-pushed the contrib/kaizengrowth/kanban-drag-fixes branch from 69e817f to b92f911 Compare July 13, 2026 09:00
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.
@kaizengrowth

Copy link
Copy Markdown
Author

The internal-links gate failure was pre-existing on main, not from this diff: the dashboard README's Cloudflare deploy section links to integrations/cloudflare-rest-worker, a directory that has never existed in the repo's history. The link text and the commit that introduced it (ef8cf73) both refer to the open-brain-rest gateway, so I've pointed the link at integrations/open-brain-rest/ in a separate commit (66a84d9) to unblock the gate. Happy to drop that commit if you'd rather fix it separately.

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.
@kaizengrowth kaizengrowth changed the title [dashboards] Kanban drag fixes — drop on cards, reorder within columns [dashboards] Kanban fixes — drop on cards, reorder within columns, opaque modals Jul 13, 2026
@kaizengrowth

Copy link
Copy Markdown
Author

Added one more kanban UX fix (0da85a9): the card edit modal, its delete confirmation, DeleteModal, and the PriorityDot dropdown all used bg-surface, which is 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, they rendered nearly transparent and were hard to read. Fixed by adding an opaque --color-bg-overlay token (#2d302e — the bg-elevated wash composited over bg-primary, so the same intended color) and using it on those four floating panels only. Card and page surfaces are unchanged.

@kaizengrowth kaizengrowth changed the title [dashboards] Kanban fixes — drop on cards, reorder within columns, opaque modals [dashboards] Kanban fixes — reorder cards within columns, add cards to full columns, opaque modals to see task detail Jul 13, 2026
@kaizengrowth kaizengrowth changed the title [dashboards] Kanban fixes — reorder cards within columns, add cards to full columns, opaque modals to see task detail [dashboards] Kanban fixes — 1) reorder cards within columns, 1) add cards to full columns, 3) opaque modals to see task detail Jul 13, 2026
@kaizengrowth kaizengrowth changed the title [dashboards] Kanban fixes — 1) reorder cards within columns, 1) add cards to full columns, 3) opaque modals to see task detail [dashboards] Kanban fixes — 1) reorder cards within columns, 2) add cards to full columns, 3) opaque modals to see task detail Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Contribution: frontend template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant