feat: skeleton loaders, Sentry source maps, auto-deploy via webhook

RoomSkeleton: shimmer skeleton matching Room header/timeline/input layout,
  used as Suspense fallback for all three Room routes (home/direct/space)

Sentry source maps: @sentry/vite-plugin uploads 72 hidden source map files
  to Sentry on each build then deletes them from dist — stack traces now show
  real file/line numbers instead of minified bundle positions.
  Auth token loaded from /etc/lotus-deploy.env (not in git).

Auto-deploy: webhook receiver on port 9001, nginx proxies
  /hooks/lotus-deploy, HMAC-SHA256 verified, triggers on lotus branch push.
  Deploy script: git reset --hard + npm ci + npm run build + rsync to webroot.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lotus Bot
2026-05-21 20:30:44 -04:00
parent 35e4c1fb22
commit 3e9ca27761
5 changed files with 484 additions and 6 deletions
+13 -1
View File
@@ -1,5 +1,6 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { sentryVitePlugin } from '@sentry/vite-plugin';
import { wasm } from '@rollup/plugin-wasm';
import { viteStaticCopy } from 'vite-plugin-static-copy';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
@@ -94,6 +95,17 @@ export default defineConfig({
vanillaExtractPlugin(),
wasm(),
react(),
// Upload source maps to Sentry when auth token is present, then delete maps from dist
...(process.env.SENTRY_AUTH_TOKEN ? [sentryVitePlugin({
org: 'lotus-guild',
project: 'javascript-react',
authToken: process.env.SENTRY_AUTH_TOKEN,
sourcemaps: {
filesToDeleteAfterUpload: ['./dist/**/*.map'],
},
release: { name: process.env.VITE_APP_VERSION ?? 'lotus' },
telemetry: false,
})] : []),
VitePWA({
srcDir: 'src',
filename: 'sw.ts',
@@ -125,7 +137,7 @@ export default defineConfig({
},
build: {
outDir: 'dist',
sourcemap: false,
sourcemap: process.env.SENTRY_AUTH_TOKEN ? 'hidden' : false,
copyPublicDir: false,
rollupOptions: {
plugins: [inject({ Buffer: ['buffer', 'Buffer'] })],