Skip to content

Dev/optimise#1

Merged
Removable merged 13 commits intomasterfrom
dev/optimise
Apr 23, 2026
Merged

Dev/optimise#1
Removable merged 13 commits intomasterfrom
dev/optimise

Conversation

@Removable
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/dev-tools-collection-web/src/routes/__root.tsx
Comment thread .agentdocs/workflow/done/260423-fix-p0-p1-issues.md
Comment thread src/dev-tools-collection-web/src/routes/tools/timestamp.tsx
@Removable Removable merged commit b7d480c into master Apr 23, 2026
7 checks passed
@Removable Removable deleted the dev/optimise branch April 23, 2026 05:52
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.

2 participants