* 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>
66 lines
2.1 KiB
Bash
Executable File
66 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "🔧 Applying local development setup patches..."
|
|
|
|
# Check if we're in the compass directory
|
|
if [ ! -f "package.json" ] || [ ! -d "src" ]; then
|
|
echo "❌ Error: Please run this script from the compass directory"
|
|
exit 1
|
|
fi
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
# Apply middleware patch
|
|
echo "📦 Applying middleware.ts patch..."
|
|
patch -p1 < "$SCRIPT_DIR/patches/middleware.patch" || {
|
|
echo "⚠️ middleware.ts patch failed, applying manually..."
|
|
cat "$SCRIPT_DIR/patches/middleware.patch"
|
|
}
|
|
|
|
# Apply auth patch
|
|
echo "📦 Applying auth.ts patch..."
|
|
patch -p1 < "$SCRIPT_DIR/patches/auth.patch" || {
|
|
echo "⚠️ auth.ts patch failed, applying manually..."
|
|
cat "$SCRIPT_DIR/patches/auth.patch"
|
|
}
|
|
|
|
# Apply cloudflare-context (create the wrapper file)
|
|
echo "📦 Applying cloudflare-context.ts..."
|
|
if [ ! -f "src/lib/cloudflare-context.ts" ]; then
|
|
mkdir -p src/lib
|
|
cp "$SCRIPT_DIR/files/cloudflare-context.ts" src/lib/
|
|
echo "✓ Created src/lib/cloudflare-context.ts"
|
|
else
|
|
echo "⚠️ cloudflare-context.ts already exists, skipping"
|
|
fi
|
|
|
|
# Apply db-index patch
|
|
echo "📦 Applying db/index.ts patch..."
|
|
patch -p1 < "$SCRIPT_DIR/patches/db-index.patch" || {
|
|
echo "⚠️ db/index.ts patch failed, applying manually..."
|
|
cat "$SCRIPT_DIR/patches/db-index.patch"
|
|
}
|
|
|
|
# Apply next-config patch
|
|
echo "📦 Applying next.config.ts patch..."
|
|
patch -p1 < "$SCRIPT_DIR/patches/next-config.patch" || {
|
|
echo "⚠️ next.config.ts patch failed, applying manually..."
|
|
cat "$SCRIPT_DIR/patches/next-config.patch"
|
|
}
|
|
|
|
# Update .gitignore
|
|
echo "📦 Updating .gitignore..."
|
|
patch -p1 < "$SCRIPT_DIR/patches/gitignore.patch" || {
|
|
echo "⚠️ .gitignore patch failed, applying manually..."
|
|
cat "$SCRIPT_DIR/patches/gitignore.patch"
|
|
}
|
|
|
|
echo ""
|
|
echo "✅ Development setup complete!"
|
|
echo ""
|
|
echo "📝 Notes:"
|
|
echo " - These changes allow local development without WorkOS authentication"
|
|
echo " - To use WorkOS auth, remove these changes or revert the patches"
|
|
echo " - Modified files: src/lib/cloudflare-context.ts, src/middleware.ts, src/lib/auth.ts, src/db/index.ts, next.config.ts, .gitignore"
|