Skip to content

Phase 4: P2 features — bulk actions, categories, and roles#6

Merged
levifig merged 11 commits intomainfrom
dev
Feb 5, 2026
Merged

Phase 4: P2 features — bulk actions, categories, and roles#6
levifig merged 11 commits intomainfrom
dev

Conversation

@levifig
Copy link
Owner

@levifig levifig commented Feb 5, 2026

Summary

P2 feature enhancements: power tools for organizing servers, plus deployment fixes and code review hardening.

Bulk Selection Mode

  • Toggle "Select" button activates multi-select with checkboxes on all server cards
  • Sticky action bar with: selection count, Select All, Deselect All, Favorite, Unfavorite, Cancel
  • Works across all sections (favorites + owned + public + private + categories)
  • Accessible: role="checkbox" with aria-checked, keyboard Space/Enter, Escape exits mode
  • Bulk ops save localStorage once (not N times per server)

Custom Server Categories

  • User-defined categories (e.g., "Gaming", "Work") between Favorites and Owned sections
  • "Manage Categories" modal: create, rename, reorder (up/down), delete
  • Assign servers to categories via the details modal dropdown
  • Duplicate name prevention, 50-char max length
  • Schema migration v1→v2: backwards-compatible, auto-migrates on load
  • Export/import handles both v1 and v2 data seamlessly

Role Information in Details Modal

  • Displays role IDs as clickable pill badges (click to copy)
  • Proper semantic HTML: role="list" container with role="listitem" wrappers

Deployment Fixes

  • Restructured wrangler.toml: dev config is now top-level, only [env.production] overrides
  • Cloudflare auto-deploy (Workers Builds) now works correctly without --env flag
  • Fixed DO migration to use new_sqlite_classes (required for free plan)
  • Separate Discord client IDs per environment
  • Added packageManager field for CI pnpm version detection

Code Review Hardening

  • Bulk ops: single localStorage write instead of N writes per selected server
  • renderSection null guard for dynamic section lookup
  • SectionKey template literal type for real type safety
  • Category duplicate name prevention + 50-char max length
  • Escape key respects open modals before exiting selection mode
  • Card role="checkbox" + aria-checked in selection mode
  • Removed dead code (unregisterDynamicSection)

8 commits, build + 181 tests passing ✅

@cloudflare-workers-and-pages
Copy link
Contributor

cloudflare-workers-and-pages bot commented Feb 5, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
metacord-dev bfe2b78 Feb 05 2026, 12:43 AM

…fensive guards

- Fix bulk favorite/unfavorite to save localStorage once instead of N times
- Add null guard in renderSection for dynamic section lookup
- Improve SectionKey type safety with template literal types
- Add duplicate name and max length checks for categories
- Fix Escape key exiting selection mode when modal is open
- Fix role badge semantics (listitem wraps button, not on button)
- Add animate attribute to dynamic category sections
- Update card role/label for selection mode (checkbox vs button)
- Add packageManager field for CI pnpm version detection
- Remove dead code (unregisterDynamicSection)
- Clean up double type cast in importUserData
@levifig levifig merged commit 2151031 into main Feb 5, 2026
3 checks passed
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