14 Commits

Author SHA1 Message Date
Fam Zheng
f298e4a2a6 fix: resolve heredoc parsing error in deploy-oci Makefile target
Some checks are pending
Deploy to OCI / deploy (push) Waiting to run
Extract inline Dockerfile to Dockerfile.oci and scp it instead of
generating it via heredoc over SSH. Make's line-continuation backslash
was causing the heredoc delimiter to be parsed as 'DEOFnFROM' by the
remote shell, breaking the image build step.
2026-04-09 20:32:23 +00:00
麻薯
b58ba41458 fix: cap watermark dimensions to prevent RangeError on large files
buildWatermark() calls Array.join() on a lines array whose size is
derived from tile dimensions divided by wmFontSize. For files with very
many lines the codeFontSize (and thus wmFontSize) approaches zero,
making charsPerLine and lineCount astronomically large and blowing past
JS's string length limit.

Fix by:
1. Clamping wmFontSize to a minimum of 1.0 to handle pathologically
   large files.
2. Capping charsPerLine at 400 and lineCount at 150 — the watermark is
   purely decorative so this cap has no visible impact.
2026-04-07 10:56:02 +01:00
Fam Zheng
f45e842370 fix: use aarch64-linux-musl-gcc linker for cross-compile to musl target 2026-04-07 10:46:34 +01:00
Fam Zheng
720c32c485 ci: use login shell (bash -l) to fix npm PATH on host runner 2026-04-07 10:43:17 +01:00
Fam Zheng
bd3842f854 ci: use absolute /usr/bin/npm path for host runner 2026-04-07 10:42:29 +01:00
Fam Zheng
8111812d3b ci: fix PATH for host runner - include /usr/bin and cargo bin 2026-04-07 10:41:27 +01:00
Fam Zheng
73e05ef0ad ci: fix checkout - replace actions/checkout@v4 with raw git (no node in host runner) 2026-04-07 10:40:36 +01:00
fam
b3652f2cb0 Merge pull request 'perf: lazy-load file content + fix oversized tile labels' (#5) from perf/lazy-load-and-font-fix into master
Reviewed-on: https://git.euphon.cloud/euphon/repo-vis/pulls/5
2026-04-07 09:38:49 +00:00
Fam Zheng
398ae64ed9 perf: lazy-load file content and fix oversized tile labels
- Server now returns metadata-only tree on initial load (no file content
  in the JSON payload); content is served on-demand via the new
  GET /api/repos/{key}/file?path=... endpoint
- Cache still stores full content; strip_content() runs in-memory before
  the response is sent
- Frontend fetches file content lazily in _fetchContent() when a tile
  enters the LOD view, preventing a massive upfront JSON download for
  large repos (e.g. claude code)
- computeColorRanges() is now deferred to first _showCode() call instead
  of running synchronously for every file during load()
- Cap label fontSize at 5 world units to prevent giant text on large tiles
2026-04-07 10:37:31 +01:00
Fam Zheng
37d2b33f32 ci: fix branch name to master 2026-04-07 10:33:47 +01:00
Fam Zheng
71cce2dd44 ci: add Gitea Actions workflow for auto-deploy to OCI on main push 2026-04-07 10:33:10 +01:00
Fam Zheng
0be0652a49 Add K8s deployment for OCI (aarch64) and make deploy/deploy-oci targets
- K8s manifests: namespace, PVC (local-path 2Gi), deployment, service, ingress
- Ingress: repo-vis.oci.euphon.net with Let's Encrypt TLS via traefik
- Cross-compile aarch64-unknown-linux-musl for OCI ARM64 host
- make deploy: local Docker (x86_64)
- make deploy-oci: SCP binary + web dist to OCI, native docker build, k3s import
- Dockerfile accepts MUSL_TARGET build arg for multi-arch support
2026-04-06 19:54:30 +01:00
Fam Zheng
4aec9510e4 Add syntax highlighting, OSD, search, perf optimizations, and UX improvements
- troika-three-text MSDF rendering for resolution-independent code text
- highlight.js syntax highlighting with Catppuccin Mocha colors
- Lazy text pool: max 25 concurrent code meshes, created on demand
- LOD throttled to every 3 frames, OSD every 10
- 45° tiled watermark (repo/path/filename) behind code
- OSD: breadcrumb, file stats, zoom level
- Search: / or Ctrl+F to find and fly to files
- Keybindings: WASD pan, Q/E rotate, Z/C zoom, Space overview, ? help modal
- Mouse wheel zoom vs trackpad pan detection via event frequency
- Zip GBK filename encoding fallback for Chinese filenames
- Docker volume persistence for SQLite cache
2026-04-06 16:30:28 +01:00
Fam Zheng
7232d4cc37 Initial commit: repo-vis — 3D codebase visualization
Rust (axum) backend with git clone / zip upload / SQLite cache.
Three.js frontend with D3 treemap layout and semantic zoom.
Docker deployment with musl static binary.
2026-04-06 13:30:12 +01:00