Skip to content

feat: SKILL.mdを修正#41

Merged
takehiroman merged 1 commit into
mainfrom
feat/result
Mar 21, 2026
Merged

feat: SKILL.mdを修正#41
takehiroman merged 1 commit into
mainfrom
feat/result

Conversation

@takehiroman

Copy link
Copy Markdown
Owner

No description provided.

@takehiroman takehiroman requested a review from Copilot March 21, 2026 03:30
@coderabbitai

coderabbitai Bot commented Mar 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b2b425d0-1cda-40f2-839e-f364db80d01d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/result

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.

OpenGrep is compatible with Semgrep configurations. Add an opengrep.yml or semgrep.yml configuration file to your project to enable OpenGrep analysis.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

このプルリクエストは、リポジトリのスキルガイドラインと開発ドキュメントを更新し、特に履歴データの取り扱いとAPIの利用に関する情報を明確にすることを目的としています。これにより、開発者が履歴機能の動作をより正確に理解し、効率的かつコスト効率の良い方法で変更を実装できるようになります。

Highlights

  • APIエンドポイントの更新: POST /api/results エンドポイントがAPI呼び出しリストに追加されました。
  • 履歴データの管理方法の明確化: Cloudflare KVに単一のキーで履歴が保存されること、および履歴がライブデータとして扱われることに関する詳細が追加されました。
  • 開発ワークフローの改善: 履歴データの変更に関する具体的な手順と、フリーティアを意識したKV利用の推奨事項が更新されました。
  • 検証手順の拡充: プロダクションビルドの検証コマンド (npm run build) が追加されました。
  • 既知の落とし穴の更新: 履歴データの保持ロジックとSWRキャッシュの管理に関する注意点が更新されました。

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@takehiroman takehiroman merged commit 9d34523 into main Mar 21, 2026
3 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

このプルリクエストは、SKILL.md を更新し、戦績履歴機能がハードコードされたデータからバックエンドを利用する形に変更されたことを反映するものです。新しいAPIエンドポイント、SWRを利用したデータフロー、そして新しい実装に伴う注意点など、将来の開発者にとって重要なコンテキストが追加されており、全体として良い改善です。一点、Known pitfallsセクションからSQLインジェクションの可能性に関する警告が削除されています。この警告はまだ有効である可能性があるため、ドキュメントに残しておくことを検討してください。詳細はコメントをご確認ください。

Comment thread SKILL.md
Comment on lines 60 to -61
If a task touches Cloudflare runtime behavior, note that local verification may also require a Pages/Workers dev setup that is not fully captured by current package scripts.

## Known pitfalls

- `functions/api/routes/weapon.ts` builds the SQL `LIMIT` clause from the query string directly. Be cautious when changing request handling there.
- `index.html` still has the default Vite title, so product polish tasks may need to update app metadata.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

この「Known pitfalls」から functions/api/routes/weapon.ts に関する警告を削除していますが、この警告はまだ有効だと思われます。
weapon.ts の L35 では、SQLクエリに文字列補間 (LIMIT ${parsedCount}) を使用しており、これはSQLインジェクションのリスクを伴う可能性があります。
parsedCount は数値であるか検証されていますが、セキュリティのベストプラクティスとして、このような記述は避けるべきです。
将来の開発者がこのリスクを認識できるよう、この警告を残しておくことを推奨します。

Copilot AI left a comment

Copy link
Copy Markdown

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 updates SKILL.md to reflect the current /api/results history workflow (KV-backed result history + SWR cache updates) and to add guidance around keeping frontend/backend behavior aligned and free-tier-conscious.

Changes:

  • Document POST /api/results alongside the existing history endpoints.
  • Update repo “working rules” to describe live history + SWR mutation-based freshness and bounded KV storage.
  • Add/adjust verification and known-pitfall notes (build step, retention-limit alignment).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread SKILL.md
Comment on lines +36 to +37
- `useSWR('results', ...)` reads current history from `GET /api/results`.
- After `POST /api/results`, the frontend updates the SWR cache directly instead of forcing a refetch.

Copilot AI Mar 21, 2026

Copy link

Choose a reason for hiding this comment

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

src/app.tsx sets revalidateOnMount: false (and also disables focus/reconnect revalidation) and there’s no SWRConfig fallback/other mount-time trigger in src/, so the history list may not be fetched on initial page load. This makes the statement that useSWR('results', ...) “reads current history from GET /api/results” potentially misleading; consider clarifying the docs or adjusting the app’s initial fetch strategy so history is actually loaded on mount.

Suggested change
- `useSWR('results', ...)` reads current history from `GET /api/results`.
- After `POST /api/results`, the frontend updates the SWR cache directly instead of forcing a refetch.
- `useSWR('results', ...)` manages the result history cache under the `'results'` key. Given the current SWR config in `src/app.tsx` (with `revalidateOnMount`, focus, and reconnect revalidation disabled), history is not automatically fetched on initial page load unless you explicitly trigger a fetch.
- After `POST /api/results`, the frontend updates the SWR cache directly instead of forcing a refetch, to avoid extra KV reads.

Copilot uses AI. Check for mistakes.
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