Add panorama previews and repair beta export rendering

This commit is contained in:
2026-10-04 23:12:34 +05:00
parent 763cf8713c
commit aec0641f87
21 changed files with 802 additions and 60 deletions

42
docs/moderation.md Normal file
View File

@@ -0,0 +1,42 @@
# Moderator access
MineGeo checks `public.profiles.role` on the server for every moderation request. A contributor cannot change their own role through the website or Supabase's public API. No Discord role, JWT metadata, or additional plugin is required.
1. Have the moderator sign in to MineGeo and open their dashboard once.
2. In the **MineGeo** Supabase project, open **Authentication → Users** and copy that person's user UUID.
3. Open **Table Editor → public.profiles**, find the matching `id`, and set `role` to `moderator`. Keep the existing ID and display name.
4. The moderator can open `/moderation`, inspect each location in 360°, approve a submitted map, return it with feedback, unpublish a map, and resolve community reports. The role takes effect on the next request.
Alternatively, the project owner can run this in Supabase's SQL Editor, replacing the email with the intended account:
```sql
insert into public.profiles (id, role)
select id, 'moderator'
from auth.users
where lower(email) = lower('moderator@example.com')
on conflict (id) do update set role = excluded.role
returning id, role;
```
The query must return the intended user's ID. An empty result means the person has not signed in with that email yet. To remove moderator access, change that profile's role back to `contributor`.
Treat the website role separately from Supabase organization membership: moderators do not need access to your Supabase project or its secret key. The existing test moderator account is a verification fixture; it does not grant access to your personal account.
# First beta map
After deploying the updated website and worker:
1. Open the private draft in `/dashboard`. Use **Look around** to inspect its complete panorama, including terrain near the edge of the export.
2. Keep at least five usable locations. Saved exclusions can now be restored after a reload. Locations removed by older versions cannot be recovered unless the original capture manifest is available.
3. Save and submit the map for review.
4. A moderator opens `/moderation`, checks **Inspect 360° locations**, and approves the map. It then appears in **Play & maps** and visitors can play without signing in.
The rendering fix must run on existing images as well as new uploads. This session repaired the private draft `00ff0076-cae1-4a0d-ab81-9014833309f4` in Supabase while preserving its ten selected locations, metadata and original terrain upload. Refresh its preview to see the corrected textures.
For another completed private plugin draft with the same rendering issue:
```sh
npm run repair:panoramas -- <dataset UUID>
```
This command renders and verifies the original terrain first, then replaces the draft's private media. It refuses published revisions, maps under review, and active/failed processing jobs. For failed processing, use the existing `npm run reprocess -- <dataset UUID>` recovery workflow instead. Server-generated views retain simplified lighting and biome color approximations; entities, custom packs and dynamic sign text remain outside the capture scope.

View File

@@ -1,5 +1,24 @@
# Verification of the export/upload fixes
## First beta texture and usability fixes (October 4, 2026)
The renderer previously treated `waterlogged=false` on leaf blocks as water and tinted trees blue. Tint selection now uses the block identifier and exported biome. Animated vanilla sprite sheets use a single frame, grass overlays avoid depth flickering, partial block models use their derived face UVs, and element rotations also rotate lighting normals.
Verification completed against the configured MineGeo project:
- All 31 unit tests and TypeScript checking passed, including blue-leaf tint, sprite frame selection, restoring excluded locations after reload, and invalid selections.
- The Next.js 16.3.8 production build passed.
- Both the small renderer fixture and cached real Paper export passed, with no unsupported models.
- The user's 2,651,888-block private export rendered 8,838,392 faces and all ten selected panoramas with no unsupported models; its corrected map/previews were uploaded to Supabase. Windows/AMD geometry construction took about 8.8 seconds; the whole render took about 23.7 seconds, excluding download/upload. These measurements do not establish macOS performance.
- A temporary fixture verified private-draft denial, draft selection persistence/restoration, interactive 360 previews, moderator review and approval, report resolution, and a guest game through all five rounds to results with real Supabase timers/scores. A different browser could not read the guest session. No uncaught browser errors were observed. The fixture was unpublished, media removed, and database rows cleaned up afterward.
- After the user's browser preference was updated, remaining UI checks used Codex's built-in Browser. The earlier standalone test browser and its terminal window were closed.
Local screenshots and the regression report are retained in `.cache/beta-verification`. The repaired export's report and images are retained in `.cache/panorama-repair/00ff0076-cae1-4a0d-ab81-9014833309f4`. The user's map remains a private draft pending their moderator workflow. The website UI changes need deployment; no new database migration is required.
The Supabase security advisor reported no application schema warnings; tables without client policies are intentionally server-only. Its separate leaked-password-protection warning concerns the project's authentication setting; see [Supabase's password protection guidance](https://supabase.com/docs/guides/auth/password-security#password-strength-and-leaked-password-protection). The site uses magic-link sign-in; the beta test used an existing password-based fixture account.
---
The following checks passed on Windows with Java 21 and Minecraft/Paper 1.21.11:
- A temporary Paper server with no connected player exported 16 chunks / 10,112 retained blocks and five valid surface viewpoints.