Repository navigation
chore: run the m1 code audit - #54
Merged
Merged
Conversation
Quest-Claim: 2e6e398a0d06b03e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 26, 2026 07:12
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 51 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 26, 2026
Collaborator
Author
|
Maintainer decision (via /quest-run): ✅ Follow-ups:
(Written by Claude Opus 5.5) |
Resolve the auth.ts conflict by keeping both SESSION_LIFETIME and #53's GUEST_TYPE. Deleting app/tailwind.config.js hid the iconify icon sets from #56's fallow gate, so .fallowrc.jsonc now names them: @iconify/tailwind4 loads them by name from icon classes. Record the maintainer's answers on prune-dev-icons-and-assets and clear dead-code-gate's wait on #56. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tailwind 4.3 ships scrollbar-thin and scrollbar-thumb/track utilities, so the WebKit-only custom-scrollbar class dropped Firefox's thin, themed bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The local API allows only the http://localhost:1420 origin, so a wrangler dev preview of a development build needs that port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 26, 2026
kixelated
added a commit
that referenced
this pull request
Nov 26, 2026
Main's code audit (#54) dropped the export because nothing imported it, but this branch's test page patches Textures.prototype.upload to read which frame each tile drew. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
added a commit
that referenced
this pull request
Nov 26, 2026
Main dropped Bounds.create in the code audit (#54). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the first run of the
codeaudit (quest/m1/audit-code.md), checked againstmainafter #47–#52.Problem
api/andapp/(about 18k lines) held dead code, overbuilt helpers, stale config from before Tauri was removed, and one lint suppression with no reason given. A Knip pass plus a read of every area turned up the following.Approach
Dead code deleted
OAuth.Context.getLinksand theRow/NewRowtypes, the unusedloginSchema/loginResponseSchema/Login/LoginResponse, theidSchemaalias, the default export indatabase.ts, the unusedexpiresInparameter onAuth.create(now a namedSESSION_LIFETIME), and a redundant Apple-only guard.Bounds.create/dom/mult/div/clone/lerpandVector.clone/lerpmethods,ChatMessage,ALL_EMOJIS,PreviewInfo, andFakeBroadcast.enabled. Also the TTS worker's quality switching (only "high" ever reached it) plusdetectWebGPU,ready,supportsHigh,resume, and thevoice/speedoptions. Also theTTSProps,SoundProps.tts, andAudioProps.panprops, the unreadhoveringrender modifier, dead?? 1scale fallbacks, the optionalPannedSound.analyser(it is always created), the unreachable%branch in the meme position parser, andchat.message.enabled/chat.typing.enabled(never false or never read), along with their guards incontrols.tsxandmeme-selector.tsx.Badge.get, theLoginerrorprop, thePreviewRoomnameprop,FavoriteRoomcreatedAt, the"chat"mobile section andchatRef, the#supportdivs, unused CSS (.controls,.pointer-gaps,.potato), Tooltip's unusedleft/rightplacements, the dev-only duplicate check inrandom.ts, the duplicate namedSettingsexport, and thevite-env.d.tsentries thatvite/clientalready declares.LoginPage,Visualize,supportsWebGPU,Textures,LocationValue,ChatValue,appleName,callbackSchema,ROOM_NAME_REGEX, the testBucket).Simplified
metadata.tsnow takesTRACK,PRIORITY,HangCatalog, andTrackReffrom@moq/roominstead of keeping local copies, and buildsRequestSchemafromPositionSchema's shape.Account.Contextreads the avatar columns through one#avatar(id)helper instead of three copies.api.tsbuilds Hono routes in oneroutes(token)helper. TTS join and leave announcements sharepick().space.tshandlesmouseupandmouseleavewith one handler. Bothaudio.tsandsound.tsuse the oneFADE_TIMEconstant fromsound.ts.meme.loaddrops a fallback that could never match, and matches only the lookup tables' own keys (Object.hasOwn), so a peer's/constructorstays plain chat.Config and recipes
biome.jsoncnoTsIgnore: off(no@ts-ignoreremains),.rustfmt.toml(no Rust remains),app/tailwind.config.js(Tailwind v4 never loads it), thevscode-pnpmrecommendation, the appupgrade/bundlerecipes anddevscript, and the deprecateddevShellflake output.useMediaCaption: off, now with its reason. Replaced theuseAltText: nosuppression inicons.tsxwith real alt text.just api fixtojust api types, since it regeneratesworker-configuration.d.ts. Fixed stale comments: "Cloudflare Pages",APPLE_PRIVATE_KEY(the code readsAPPLE_CLIENT_SECRET), the@hang/apipackage description ("tRPC"), and leftover TODOs.app/package.jsonbuildnow passes--mode live. Without a mode,just build(what CI runs) built in production mode with everyVITE_*variable undefined.Bug fixed (reproduced first)
locationFields()now starts the handle unset. The local and fake sources already set their own. New test:a watched window stays locked until its location arrives.Left to sibling PRs, to avoid conflicts
rolldownOptions, the invalidworker.dedup, unused packages,uuid→crypto.randomUUID(), andrsyncin the dev shell (unused; not in chore(deps): patch advisories, drop unused dependencies, gate them with fallow #56, so it falls to the nextdepsrun).app/.env.staging,setup-windows.sh, the dead rootprodrecipe, and theloginStartcomment.api/src/room.tsand thejust api devline.joinSchemainroom.tsis dead; the next stub checks it first.Kept on purpose (recorded in the next stub):
Settings.captionsand the commented-outClosedCaptions, which captions-ai-voice re-enables.noStaticElementInteractionssuppression on the tooltip wrapper.worker-configuration.d.ts.Merged main (after #53, #56, #67):
auth.tskeeps bothSESSION_LIFETIMEand #53'sGUEST_TYPE. Deletingapp/tailwind.config.jshid@iconify-json/material-symbolsand@iconify-json/mdifrom #56's fallow gate, which only saw them through that file's dynamic imports.@iconify/tailwind4inapp/index.cssloads them by name fromicon-[set--name]classes, so.fallowrc.jsoncnow lists them underignoreDependencies.Next run: deleted
quest/m1/audit-code.mdand plannedquest/m2/audit-code.md(requires m1, scheduled 2026-12-02) with the baseline, the excluded scope, and what to check first.Impact
@hang/apiis private to this repo, and every removed export had no consumer.just buildnow builds what deploy ships.just api fixrecipe is nowjust api types, and the app'sbun run devscript is gone (just app devis the entry point).Alternatives
just check: it takes about 1 s and failed on a planted dead export. I dropped it once I saw chore(deps): patch advisories, drop unused dependencies, gate them with fallow #56 adds fallow, moq's tool. Two analyzers would overlap, so widening fallow to files and exports is the follow-up instead.Choices made without asking
top/bottom: all 18 call sites use those.random.tsinstead of moving it to a test: a duplicated word only skews odds.canvas.tsloseContext"stale context" issue: a canvas returns the sameWebGL2RenderingContextacross loss and restore.Decisions
/quest-mergethis PR (rejected: iterate, skip).dead-code-gate,dedupe-room-helpers, andprune-dev-icons-and-assetsas follow-ups.prune-dev-icons-and-assets: ✅ (a) delete the/dev/iconsgenerator,icons.tsxandjszip(rejected: (b) keep only the favicon and Discord banner, (c) keep it); ✅ (a) delete every unreferencedapp/publicfile (rejected: (b) only the commented-out memes and sounds, (c) keep them). Recorded in the quest's Plan.Caused by
Follow-ups
space.tsgestures, fade ×3, GL deformation uniforms ×3, click-outside ×5, settings persistence ×17), remove theBroadcastSourceplaceholder fields, and replace theroom/preview/wrapper with@moq/room. Kept. No open decisions./dev/iconsgenerator (icons.tsx,jszip) and every unreferencedapp/publicfile. Kept, with both decisions settled (below). No open decisions.Validation
quest gate just checkpasses: quest check, TypeScript, Biome, 39 API tests, 59 app tests (including the new handle test and ameme.loadtest for inherited keys such as/constructor, each failing without its fix), and 2 Chromium media tests against a local relay.quest gate just buildpasses, and the bundle now embeds theapi.hang.liveURLs.POST /room/…/join200). The meme selector tooltip sits above its button, with the arrow on the button's center (361 px). Dragging my tile setgrabbing, and releasing reset the cursor.meme.loadresolvesanother-one,AnotherOne, andanotherone, and rejects unknown names. No page errors. Chrome didn't runrequestAnimationFramein the shared window, so I patched it to a 16 ms timer for the tooltip and drag checks.quest gate just check(now with fallow) andquest gate just buildpass;just buildstill compiles the iconify classes. Review round 1 then caught two audit deletions that were wrong, both restored: Tailwind 4.3 does ship thescrollbar-*utilities the room preview list used (Firefox lost its thin bar), andapp/wrangler.jsoncdev.portkeeps awrangler devpreview on the one origin the local API allows.Models
🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with medium)
Review
Rewritten by
quest reviewafter each round.Head: d1075b8
Base: origin/main at 2b42a80
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.2-sol, xhigh effort
Session:
01a21955-f033-7950-8333-69bd491dbbd2, round 3Score: 10/10,
The local Worker preview works with the local API again, and the head is ready to land.Rounds: 3; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0
Findings: none
The last round's findings, at c11147b:
app/wrangler.jsonc:12:Keep the local Worker preview on port 1420;`app/wrangler.jsonc:16` restores `dev.port` to 1420, matching the development build’s app URL (`app/.env.development:2`) and the local API’s allowed origin (`api/wrangler.jsonc:42`, `api/src/rpc.ts:23`).