Conversation
…dead code, CSS extraction, hostname opt, password validation Agent-Logs-Url: https://github.com/numbersprotocol/proofsnap-extension/sessions/6daa6ad4-39a9-478e-9c93-eafb50ebd8e3 Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
…nt/href instead of innerHTML Agent-Logs-Url: https://github.com/numbersprotocol/proofsnap-extension/sessions/6daa6ad4-39a9-478e-9c93-eafb50ebd8e3 Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
…Length explicit for login mode Agent-Logs-Url: https://github.com/numbersprotocol/proofsnap-extension/sessions/6daa6ad4-39a9-478e-9c93-eafb50ebd8e3 Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix popup overflow clipping and share.tsx React bypass
Fix popup overflow clipping, share.tsx React bypass, type divergence, settings debounce, and 6 other improvements
Apr 5, 2026
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.
Ten medium-priority code quality and UX issues identified in a deep audit: popup content clipping, unnecessary React bundling, dead types, keystroke-level storage writes, a race condition, dead API surface, excessive inline styles, DOM style mutation, redundant URL parsing per render, and missing password validation.
Changes
UX
popup.html: Replaceheight:500px; overflow:hiddenwithmin-height/max-height + overflow-y:auto— content was silently clippedBundle / File Type
share.tsx→share.ts: File used raw DOM only;.tsxextension caused React (~40KB) to be included unnecessarily. Updatedvite.config.tsentry point accordingly.Type Cleanup
types/index.ts: DeleteUserSettings(6-field interface, exported but never used).StoredSettingsinStorageService.tsis the single source of truth.Storage
options/options.tsx: DebouncehuntModeMessageandhuntModeHashtagssaves by 400ms using local state +useReftimers — previously wrote on every keystroke, risking Chrome'sMAX_WRITE_OPERATIONS_PER_MINUTE(120) limit.AuthService
deleteAccount(): Add missingawaitbeforethis.clearAuth()— race condition where token could persist after account deletion.resetPassword()andupdateUser()(no UI callers) and their associated private types.CSS / Styles
SharePromptModal: Extract all inline style objects to named CSS classes inpopup.css. ReplaceonMouseOver/onMouseOutDOM style mutation with CSS:hover/:focus-visible.AssetThumbnail: Movedisplay:flex; align-items:center; gapfrom inline styles to.asset-websiteand.asset-statusCSS rules. Extract hunt share button styles to.hunt-share-buttons,.share-btn.share-x,.share-btn.share-copy.Performance
popup.tsx: Movenew URL(asset.sourceWebsite.url).hostnameout of the JSX render expression into a pre-computed variable — was re-parsing the URL on every render for every asset.Auth Validation
AuthForm.tsx: AddminLength={8}on the password field for signup mode (minLength={1}for login), client-side length check inhandleSubmit, and an inline hint shown while typing if the password is too short.Security
share.ts: Validatenidagainst/^[a-zA-Z0-9_-]+$/before use; set anchorhrefandtextContentvia DOM properties instead of interpolating intoinnerHTML(XSS). Addnoopener,noreferrertowindow.open()for the Twitter share link.