Feature: tile height variation + stalagmite bottoms + live content refresh

## Tile height variation (fix)
Tile tops now visibly vary (0.8–1.0) from a fixed bottom at world Y=0.
Previously the top was fixed and the variation was only visible underneath.
Heights are seeded by tile coordinate so they're deterministic per board.
Unit y_offsets and highlight positions update to match per-tile height.

## Stalagmite tile bottoms
Server: new TileBottomModel entity + migration (catalog.tile_bottom_models),
content.tile_bottoms handler returns all active CDN URLs.
Admin: "Tile Bottom Models" section in the Tile Model Manager page —
  add/toggle active/delete entries with CDN picker.
Client: ContentCache fetches + disk-caches the URL pool; _try_load_tile_model
  picks a random URL and attaches it flipped below the tile model as a
  stalagmite using the existing _fit_model_to_tile scale logic.

## Live content refresh
ContentCache schedules start_sync() every 5 minutes after sync_complete so
card definitions, tile models, and bottom models are refreshed in the
background without restarting the client.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-16 15:05:48 -04:00
co-authored by Claude Happy
parent 977d150a46
commit 51f3ee23d4
9 changed files with 419 additions and 20 deletions
@@ -0,0 +1,45 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SOR.Database.Migrations.Catalog
{
/// <inheritdoc />
public partial class AddTileBottomModels : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "tile_bottom_models",
schema: "catalog",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
CdnKey = table.Column<string>(type: "text", nullable: false),
PublicUrl = table.Column<string>(type: "text", nullable: false),
IsActive = table.Column<bool>(type: "boolean", nullable: false, defaultValue: true),
UpdatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
},
constraints: table =>
{
table.PrimaryKey("PK_tile_bottom_models", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_tile_bottom_models_IsActive",
schema: "catalog",
table: "tile_bottom_models",
column: "IsActive");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "tile_bottom_models",
schema: "catalog");
}
}
}