Conversation
- browserコマンドでの uninitialized constant NameError を解消するため、Database と Downloader の require を追加 (#115) - server-bind 変更時にWebUIからEPUBがダウンロードできなくなるバグを修正するため、接続先を window.location.hostname に基づいて動的に解決するよう修正 (#114) - 三点リーダーからの小説個別削除が失敗するバグを修正するため、DELETEメソッドではなく実績のある一括削除用のPOST APIを呼び出すよう代替 (#113) - 開発環境の調査結果とAntigravity/Gemini用の開発ガイドラインとして、GEMINI.md をルートおよびfrontend配下に作成
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20b23b7678
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| require "optparse" | ||
| require "termcolorlight" | ||
| require "core/database" |
There was a problem hiding this comment.
Use root-relative require path for Database
CommandBase is loaded for every CLI command, but this new require "core/database" does not match this repo’s load-path convention (narou.rb only guarantees project root, and existing files require lib/...). In contexts where gem-managed lib is not on $LOAD_PATH (e.g. direct ruby narou.rb ... runs), this raises LoadError before any command executes. Switching to require "lib/core/database" keeps behavior consistent with the rest of the codebase and avoids startup failure.
Useful? React with 👍 / 👎.
| # | ||
|
|
||
| require "lib/core/inventory" | ||
| require "novel/downloader" |
There was a problem hiding this comment.
Require Downloader via project root path
This command now uses require "novel/downloader", but other command files load it as require "lib/novel/downloader". If the runtime only has project root on $LOAD_PATH (the same mode supported by narou.rb), this path is unresolved and browser fails to load with LoadError. Using the existing lib/... require form avoids environment-dependent breakage.
Useful? React with 👍 / 👎.
概要
GitHub上のオープンな不具合 (#115, #114, #113) の修正、およびAI開発用のガイドラインである
GEMINI.mdの追加を行いました。修正・変更内容
1. #115: CLI
browserコマンドにおける NameError の修正DatabaseクラスおよびDownloaderクラスが事前に require されていないため NameError (uninitialized constant) が発生し停止する。lib/cli/commandbase.rbにrequire "core/database"を追加。lib/cli/command/browser.rbにrequire "novel/downloader"を追加。2. #114: WEBUIでのEPUBダウンロード接続先解決の動的化
server-bindのIPアドレスを変更してWebUIにアクセスした際、EPUBのダウンロードAPIエンドポイントがlocalhost固定となっておりERR_CONNECTION_REFUSEDで失敗する。frontend/src/lib/backend-config.tsを修正し、ブラウザからのアクセス時はwindow.location.hostnameを用いて接続先を動的に決定するように変更。3. #113: WebUI 小説個別削除エラーの修正
DELETE /api/v2/novels/:idが存在しないため削除に失敗する。frontend/src/lib/api.tsのdeleteNovel関数を修正し、実績のある一括削除用APIremoveNovels([id])(POST /api/v2/novels/remove) を呼び出すようにフォールバック。4. 開発ガイドライン
GEMINI.mdの追加GEMINI.mdをルートおよびfrontend/配下に新規作成。検証結果
spec/cli/commandbase_spec.rbによるRSpecテストは全件正常パス (17 examples, 0 failures)。npm run checkによるフロントエンド型チェックは正常クリア (0 errors, 0 warnings)。