Repository navigation
chore: remove 32 unreferenced public/ assets (3.6 MB); key SplitEditor rows by stable id - #1189
Open
ykargeee-bit wants to merge 1 commit into
Conversation
…table id Removes 32 unreferenced files (3.6 MB) from public/, leaving manifest.json and icons/ in place, and keys SplitEditor rows by a stable id instead of their array index. The public/ audit found that of the 35 files present, only two groups are referenced anywhere in src/, the configs, or the content: * manifest.json -- linked from src/app/layout.tsx (manifest: '/manifest.json') and next.config.js, and named in the CHANGELOG as what makes the app installable. * icons/icon-192x192.png and icons/icon-512x512.png -- the src entries of the manifest's icons array. Everything else has zero references. Searched for each basename across the 277 non-public files, for literal 'public/' references, for @font-face/font-family declarations, for app-level icon/og/robots/sitemap conventions, and for local <img>/url() sources. Two things the search turned up that explain why these are dead: * The 11 Fontspring-DEMO-poly-*.otf files and the 4 Proxima Nova .ttf files load nothing: the app uses next/font/google (Inter), and there is not a single @font-face rule or font-family declaration in the repo. * The 5 images/events/*.png files are leftovers; next.config.js images remotePatterns point at images.unsplash.com, cdn.veritix.io and res.cloudinary.com, and nothing local. After the deletion, re-ran the reference check: no remaining file mentions any of the removed names. SplitEditor: rows were keyed by index. React reconciles a position rather than a row, so removing a row left the surviving inputs bound to the row that shifted into their place -- typing into 'wallet 2' could edit 'wallet 1' once an earlier recipient was removed. rowId() now keys by the wallet address and falls back to the index only for rows too empty to identify themselves. Note on issue Lead-Studios#1094: two of its three items were already satisfied on main by 53c8967 (2026-10-17) -- inputs are controlled with no readOnly prop, onChange is called from handleChange, and Add recipient / Remove controls exist. Verified against 35706d4 (61 lines, broken) vs HEAD (96 lines, working). The remaining item, stable row keying, is what this commit implements.
|
@ykargeee-bit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Two housekeeping tasks: deleting unreferenced assets from public/, and fixing
SplitEditor's row keying.
public/ cleanup (#1154)
Of the 35 files under public/, only two groups are referenced anywhere in
src/, the configs, or the content. The other 32 are deleted — 3.6 MB
that is fetched and copied into the build on every deploy, and served as-is.
Kept
Deleted
over from the pre-reset app;
ext.config.js images.remotePatterns points
at images.unsplash.com, cdn.veritix.io and
es.cloudinary.com, and
nothing references a local image.
eadme.html (0.6 MB). No @font-face rule
and no ont-family declaration exists anywhere in the repo; the app uses
ext/font/google with Inter. These fonts load nothing.
(340 KB), pngguru.png (475 KB), concert.png, steptodown.jpg,
steptodownticket.jpg, eventaillustration.png, djparty.png,
placeholder-event.svg, ellipse-19.svg, ellipse-20.svg, ile.svg,
globe.svg, window.svg.
Method
The audit searched, for each filename, all 277 non-public/ files; then
/ url() sources. After deleting, the check was re-run: no
separately checked for literal public/ references, @font-face /
ont-family declarations,
ext/font usage, app-level
icon / opengraph-image /
obots / sitemap conventions, and local
remaining file mentions any removed name.
One correction to the issue's count: it says 34 unreferenced files. At
�efad4cb (HEAD) there are 35 files in public/, and 3 of them must be kept
(manifest.json + 2 icons), leaving 32 to delete — which matches the
3.6 MB figure exactly. The two extra in the issue's count were likely already
removed between 35706d4 and the current HEAD.
SplitEditor (#1094)
Two of the three items in #1094 were already fixed on main by
53c8967 (2026-10-17, "make SplitEditor editable"). At 35706d4 the file was
61 lines with
eadOnly inputs and no onChange call; at HEAD it is 96 lines
with controlled inputs, onChange called from handleChange, and
Add recipient / Remove controls. Verified by diffing both revisions.
The remaining item — key rows by a stable id — is implemented here.
Rows were keyed by array index:
` sx
{rows.map((row, index) => (
React reconciles a position, not a row. Removing a row therefore left the
surviving inputs bound to the row that shifted into their place — typing into
"wallet 2" could edit "wallet 1" once an earlier recipient was removed.
owId() now keys by the wallet address, falling back to the index only for
rows too empty to identify themselves, so it stays unique without forcing
callers to thread an id through their state:
sx function rowId(row: SplitRow, index: number): string { const wallet = row.walletAddress.trim(); return wallet ? wallet- : ow-; }Testing
src/tests/split-editor.test.tsx (new, 8 tests, vitest + testing-library):
full updated row array (controlled inputs);
must equal 100% for an unbalanced split;
row keeps its own value, and editing it does not touch any other recipient.
Note:
owId is not exported, so the keying test asserts observable behaviour
(typing into the surviving input edits that input) rather than the key string,
which keeps the test honest about the contract rather than the implementation.
Security
No security impact. Nothing was added, moved, or made executable — this is a
pure deletion of dead assets plus a client-side React keying fix. The deleted
files were already public and unauthenticated, and the surviving
manifest.json / icons/ are unchanged.
Bundle impact
Removing 3.6 MB of static assets shrinks the public output copied into every
deployment. No source that referenced them exists, so nothing should change at
runtime;
ext build will confirm.
Closes #1094
Closes #1154