Conversation
added 13 commits
April 23, 2026 11:19
There was a problem hiding this comment.
Pull request overview
This PR focuses on cleanup/optimization of the dev-tools web app: improving theming + page metadata, making tool search i18n-driven, fixing some tool UX/perf issues, and removing dead/unused code (including the internal IP Info tool/page).
Changes:
- Add theme switching (next-themes) and centralized page metadata syncing (
document.title+<html lang>). - Refactor tools metadata/search to remove hardcoded tool names and support bilingual alias search; convert the IP Info tool to an external link.
- Fix/optimize individual tools (HTML preview uses
srcDoc, Base64 chunk encoding, clipboard Promise handling lint cleanups) and remove unused files/deps.
Reviewed changes
Copilot reviewed 26 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/dev-tools-collection-web/src/routes/tools/timestamp.tsx | Uses void for clipboard writes (lint) and keeps copy UI behavior. |
| src/dev-tools-collection-web/src/routes/tools/qrcode-generator.tsx | Removes console error logging from QR generation catch path. |
| src/dev-tools-collection-web/src/routes/tools/ip-info.tsx | Deletes the internal IP Info tool route/page. |
| src/dev-tools-collection-web/src/routes/tools/html-preview.tsx | Reworks preview rendering to use iframe srcDoc + refresh key; adds charset injection helper. |
| src/dev-tools-collection-web/src/routes/tools/base64-codec.tsx | Adds chunked Uint8Array→Base64 helper and reuses it for text/file encoding. |
| src/dev-tools-collection-web/src/routes/index.tsx | Drops dead popular-tools state and wires in page metadata hook. |
| src/dev-tools-collection-web/src/routes/__root.tsx | Gates router devtools rendering behind import.meta.env.DEV. |
| src/dev-tools-collection-web/src/routeTree.gen.ts | Regenerated route tree to remove /tools/ip-info. |
| src/dev-tools-collection-web/src/main.tsx | Wraps router with ThemeProvider. |
| src/dev-tools-collection-web/src/localization/zh.ts | Adds theme/external-link strings; removes ipInfo namespace. |
| src/dev-tools-collection-web/src/localization/en.ts | Adds theme/external-link strings; removes ipInfo namespace. |
| src/dev-tools-collection-web/src/hooks/usePageMetadata.ts | New hook to sync document.title and <html lang>. |
| src/dev-tools-collection-web/src/hooks/useGetIpInfo.ts | Deletes IP info scraping hook. |
| src/dev-tools-collection-web/src/data/tools.ts | Removes hardcoded names, adds externalUrl, and updates search to use i18n aliases. |
| src/dev-tools-collection-web/src/components/ToolPageLayout.tsx | Replaces useDocumentTitle with usePageMetadata. |
| src/dev-tools-collection-web/src/components/ToolCard.tsx | Supports external tools via <a target="_blank"> and shows an external-link icon. |
| src/dev-tools-collection-web/src/components/ThemeSwitcher.tsx | New tri-state theme selector (light/dark/system). |
| src/dev-tools-collection-web/src/components/SearchBar.tsx | Passes i18n instance into searchTools and removes hardcoded text color. |
| src/dev-tools-collection-web/src/components/LanguageSwitcher.tsx | Simplifies language switching logic (no local mirrored state). |
| src/dev-tools-collection-web/src/components/Footer.tsx | Adds ThemeSwitcher alongside LanguageSwitcher and updates styling tokens/layout. |
| src/dev-tools-collection-web/src/assets/react.svg | Removes unused asset. |
| src/dev-tools-collection-web/src/App.tsx | Removes unused legacy App entry. |
| src/dev-tools-collection-web/pnpm-lock.yaml | Updates lockfile to reflect removed deps. |
| src/dev-tools-collection-web/package.json | Removes unused deps; keeps/uses next-themes. |
| src/dev-tools-collection-web/index.html | Sets neutral fallback title (Toolbox). |
| .agentdocs/workflow/done/260423-fix-p0-p1-plan.md | Adds archived implementation plan doc. |
| .agentdocs/workflow/done/260423-fix-p0-p1-issues.md | Adds archived design doc (with some status wording inconsistencies). |
| .agentdocs/index.md | Adds/updates agent docs index content. |
Files not reviewed (1)
- src/dev-tools-collection-web/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.