大規模コード改善 - モジュール化・UI刷新・型安全性向上#2
Merged
Merged
Conversation
- Split 888-line index.ts into 8 focused modules (resolver, github, filters, tree, ui, mcp, types, constants) - Modern landing page with dark mode, responsive design, animations - Add Vite + @cloudflare/vite-plugin for modern dev workflow - Add tsgo (TypeScript 7.0 native preview) for fast type checking - Chrome extension "Go to Pera1" button on GitHub repo pages - Cache-Control headers, updated compatibility_date, nodejs_compat Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add escapeHtml() and escapeJs() functions to ui.ts - Escape all dynamic values (errorMessage, targetUrl, protocol, host) - Fix O(n²) Array.from() in tree.ts loop Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove package-lock.json from repo (pnpm-lock.yaml is the lockfile) - Add package-lock.json to .gitignore - Pin @typescript/native-preview to exact version (preview builds need stability) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add normalizeRepositoryInput() to resolver.ts for SSH/SCP/git:// URL normalization - Client-side normalization in UI form for git@ format input - Strip .git suffix from all URL formats - Support: git@, ssh://, git://, https://, bare github.com/owner/repo Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 19 unit tests for resolveRequest (basic, tree/blob, query params, SSH, .git removal, errors) - 14 HTTP integration tests via app.fetch (basic, branch, filter, file, tree, MCP, SSH, landing, fallback, errors) - vitest config with TS-first resolution - Test ZIP helper using JSZip for realistic GitHub codeload responses Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ci.yml: runs vitest + tsc type check on PRs and pushes to main - deploy.yml: deploys to Cloudflare Workers via wrangler on main merge - Uses CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID from GitHub Secrets Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- wrangler.toml: add [env.preview] with name = "pera1-preview" - ci.yml: deploy to preview env on PR, post preview URL as PR comment - deploy.yml: production deploy only on main merge (unchanged behavior) - Preview updates on every push to PR branch Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
package-lock.json is gitignored, so npm ci fails. Switch to npm install. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Align fetch interceptor types with Cloudflare Workers RequestInit types. Use Promise<Response | null> instead of Promise<Response> | null. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🚀 Preview deployed! https://pera1-preview.kazu-san.workers.dev This preview will be updated on every push to this PR. |
Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
変更内容
モジュール分割
src/index.tssrc/resolver.tssrc/github.tssrc/filters.tssrc/tree.tssrc/ui.tssrc/mcp.tssrc/types.tssrc/constants.ts開発ツールチェーン
vite dev/vite buildで開発・ビルドnpm run typecheck:nativeで tsgo 高速型チェックChrome拡張
extension/ディレクトリにManifest V3拡張Screenshots
ランディングページ(ライトモード)
ダークモード
Test plan
🤖 Generated with Claude Code