* feat(ui): improve mobile sidebar and dashboard layout - Enlarge compass logo on dashboard page (size-14 idle, size-10 active) - Reposition logo higher with -mt-16 margin - Add 6rem spacing between logo and chat - Remove feedback hover button from bottom right - Add event-based feedback dialog opening for mobile sidebar - Remove feedback buttons from site header (mobile and desktop) - Add mobile theme toggle button to header - Increase mobile menu hitbox to size-10 - Reduce search hitbox to separate clickable area - Remove redundant Compass/Get Help/Assistant/Search from sidebar - Rename "People" to "Team" - Add mobile-only feedback button to sidebar footer - Reduce mobile sidebar width to 10rem max-width - Center sidebar menu icons and labels on mobile - Clean up mobile-specific padding variants * chore: add local development setup system - Create .dev-setup directory with patches and scripts - Add apply-dev.sh to easily enable local dev without WorkOS - Add restore-dev.sh to revert to original code - Document all changes in README.md - Store cloudflare-context.ts in files/ as new dev-only file - Support re-apply patches for fresh development sessions This allows running Compass locally without WorkOS authentication for development and testing purposes. --------- Co-authored-by: Avery Felts <averyfelts@Averys-MacBook-Air.local>
Local Development Setup
This directory contains patches and scripts to enable local development without WorkOS authentication.
What This Does
These patches modify Compass to run in development mode without requiring WorkOS SSO authentication:
- Bypasses WorkOS auth checks - Middleware redirects
/to/dashboardwhen WorkOS isn't configured - Mock D1 database - Returns empty arrays for queries instead of throwing errors
- Wraps Cloudflare context - Returns mock
{ env: { DB: null }, ctx: {} }when WorkOS isn't configured - Skips OpenNext initialization - Only runs when WorkOS API keys are properly set
How to Use
Quick Start
From the compass directory:
.dev-setup/apply-dev.sh
This will apply all necessary patches to enable local development.
Manual Application
If the automated script fails, you can apply patches manually:
- middleware.ts - Redirects root to dashboard, allows all requests without auth
- lib/auth.ts - Checks for "your_" and "placeholder" in WorkOS keys
- lib/cloudflare-context.ts - New file that wraps
getCloudflareContext() - db/index.ts - Returns mock DB when
d1parameter isnull - next.config.ts - Only initializes OpenNext Cloudflare when WorkOS is configured
- .gitignore - Ignores
src/lib/cloudflare-context.tsso it's not committed
Undoing Changes
To remove dev setup and restore original behavior:
git restore src/middleware.ts
git restore src/lib/auth.ts
git restore src/db/index.ts
git restore next.config.ts
git restore .gitignore
rm src/lib/cloudflare-context.ts
Environment Variables
To configure WorkOS auth properly (to disable dev mode):
WORKOS_API_KEY=sk_dev_xxxxx
WORKOS_CLIENT_ID=client_xxxxx
WORKOS_REDIRECT_URI=http://localhost:3000
With these set, the dev patches will automatically skip and use real WorkOS authentication.
Dev Mode Indicators
When in dev mode (WorkOS not configured):
- Dashboard loads directly without login redirect
- Database queries return empty arrays instead of errors
- Cloudflare context returns null DB instead of throwing
Files Created/Modified
New Files (dev only)
src/lib/cloudflare-context.ts- WrapsgetCloudflareContext()with dev bypass
Modified Files
src/middleware.ts- Added WorkOS detection and dev bypasssrc/lib/auth.ts- Enhanced WorkOS configuration detectionsrc/db/index.ts- Added mock DB support for null D1 parameternext.config.ts- Conditional OpenNext initialization.gitignore- Addedcloudflare-context.tsto prevent commits
Future Development
Place any new dev-only components or patches in this directory following the same pattern:
- Patch files - Store in
patches/with.patchextension - New files - Store in
files/directory - Update apply-dev.sh - Add your patches to the apply script
- Document here - Update this README with changes
Troubleshooting
Build errors after applying patches:
- Check that
src/lib/cloudflare-context.tsexists - Verify all patches applied cleanly
- Try manual patch application if automated script fails
Auth still required:
- Verify
.env.localor.dev.varsdoesn't have placeholder values - Check that WorkOS environment variables aren't set (if you want dev mode)
- Restart dev server after applying patches
Database errors:
- Ensure
src/db/index.tspatch was applied - Check that mock DB is being returned when
d1is null