Skip to content

Trim over-engineering across server, web, and root tooling - #9

Merged
rene-roid merged 4 commits into
masterfrom
ponytail/audit-cleanup
Oct 3, 2026
Merged

rene-roid merged 4 commits into
masterfrom
ponytail/audit-cleanup

Conversation

@rene-roid

Copy link
Copy Markdown
Owner

Summary

  • Collapsed redundant schema.ts index/enum declarations in favor of shared enums (@sakuya/shared) and the raw DDL already in db/index.ts; de-duplicated the phash band migrations/columns/indexes into a BANDS loop
  • Simplified lib/config.ts: dropped IN_DOCKER, inlined one-off exports (PORT, HOST, AUTH_*), read APP_VERSION via a static package.json import instead of a try/catch file read
  • Replaced the manual cookie parser in lib/auth.ts with Bun.CookieMap
  • Extracted reusable server helpers: lib/download.ts (temp-file download), lib/run.ts (child process runner with bounded stderr), lib/http.ts cursor encode/decode, lib/rowToMedia.ts countMedia, lib/mediaByIds.ts mediaIdsWhere
  • Reused these helpers in discover.ts, media.ts, tags.ts, and the downloader/transcoder/scanner services to remove duplicated query/process-spawning code
  • Simplified web hooks and components (useAuth to a plain hook, new shared Modal/Segmented primitives, trimmed SelectionBar, BulkRenameDialog, BulkTagDialog, settings tabs); removed the unused Confetti component
  • Trimmed root tooling: removed .idea/.gitignore, features.txt, unused root scripts/config entries, and unused dependencies (e.g. typescript devDependency, ffprobe-static types already covered); updated CI to run bun run test and switched .impeccable/config.json ignore rules
  • .dockerignore no longer excludes nonexistent tray/.junie/run-hoyovault-upload.sh paths

Testing

  • Not run: bun test / bun run test
  • Not run: bun run build (web + server)
  • Not run: manual verification in browser

Share the job progress loop, subprocess runner and file download helpers;
return drizzle rows directly instead of field-by-field mappers; drop dead
drizzle index metadata, model_status, autoScanInterval API field, IN_DOCKER
and config aliases; derive enums, editable settings keys and config keys
from single sources.
One MediaBrowser for Explore/Library/Board pages, one native <dialog> Modal
for all dialogs, a global mutation error toast, shared settings/event-source
hooks and a Segmented control. Drop Confetti, dead API methods and props.
Render release notes at build time so marked leaves the bundle.
Drop unused better-sqlite3 and form-data, tracked junk (features.txt,
.idea), stale .dockerignore entries and script banners; fold the nginx
media location into /api/ and regenerate bun.lock.
Report tag and transcode progress after every item again, only accept a
downloader library lookup for the current path, and handle Chromium closing
a modal on a repeated Escape.
@rene-roid
rene-roid merged commit 5173d83 into master Oct 3, 2026
1 check passed
@rene-roid
rene-roid deleted the ponytail/audit-cleanup branch October 5, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant