mirror of
https://github.com/block/buzz.git
synced 2026-11-10 11:21:05 +00:00
Invite links currently return HTML without preview metadata. Add server-rendered `og:video` and `og:image` tags for `/invite/<code>`, and bundle the approved MP4 and wordmark-only poster from #9282 into the relay image. Media URLs use the request’s resolved community host, with only TLS posture from `RELAY_URL`. Unknown hosts and lookup failures receive no metadata; previews stay generic and never redeem invites. Validation: production web build, workspace Clippy, 52 router tests (including real HTTP and MP4 range requests), metadata tests, and independent agent review pass. `just ci` stops at unrelated mobile dependency/format checks. The full relay suite was attempted but stopped during database-dependent tests without local infrastructure. Broad local Rust/desktop hooks were stopped for disk pressure; desktop/mobile hooks also lack dependencies and were skipped to publish this draft. Full-stack and native Messages playback remain unverified. The new preview regressions run in both CI test-runner paths. Rollout: merge and deploy the resulting relay image with its web bundle, verify the invite HTML and both public media URLs, then share a fresh invite in Messages. Full-stack and human validation remain outstanding. --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import { readFileSync } from "node:fs";
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { tanstackRouter } from "@tanstack/router-plugin/vite";
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
tanstackRouter({
|
|
target: "react",
|
|
routesDirectory: "./src/app/routes",
|
|
generatedRouteTree: "./src/app/routeTree.gen.ts",
|
|
virtualRouteConfig: "./src/app/routes.ts",
|
|
quoteStyle: "double",
|
|
semicolons: true,
|
|
routeTreeFileHeader: [
|
|
"// biome-ignore-all lint: generated by TanStack Router",
|
|
],
|
|
}),
|
|
react(),
|
|
{
|
|
name: "invite-preview-media",
|
|
generateBundle() {
|
|
for (const [source, output] of [
|
|
["buzz-invite-loop.mp4", "buzz-invite-loop-v1.mp4"],
|
|
["buzz-invite-poster.png", "buzz-invite-poster-v1.png"],
|
|
]) {
|
|
this.emitFile({
|
|
type: "asset",
|
|
fileName: `assets/invite-preview/${output}`,
|
|
source: readFileSync(
|
|
new URL(`../previews/invite-video/${source}`, import.meta.url),
|
|
),
|
|
});
|
|
}
|
|
},
|
|
},
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": "/src",
|
|
},
|
|
},
|
|
server: {
|
|
port: parseInt(process.env.VITE_PORT || "5173", 10),
|
|
strictPort: true,
|
|
},
|
|
});
|