Skip to content

fix: [1095] キーコンフィグ画面の初期矢印色が想定通りにならない問題を修正#2118

Merged
cwtickle merged 2 commits into
developfrom
hotfix/1095-keycon-color-ex
May 17, 2026
Merged

fix: [1095] キーコンフィグ画面の初期矢印色が想定通りにならない問題を修正#2118
cwtickle merged 2 commits into
developfrom
hotfix/1095-keycon-color-ex

Conversation

@cwtickle
Copy link
Copy Markdown
Owner

🔨 変更内容 / Details of Changes

1. キーコンフィグ画面の初期矢印色が想定通りにならない問題を修正

  • カスタムキーで保存されたキーパターンが正しく取得できず、キーコンフィグ画面の初期矢印色が想定通りにならない問題を修正しました。

🔖 関連Issue, 変更理由 / Related Issues, Reason for Changes

  1. カスタムキーの場合、保存されているキーパターンの変数が通常と異なるため。
    PR feat: [1094] 色変化(ncolor_data)の0フレーム時の色をキーコンフィグ画面に一部反映する仕様を追加 #2117 の考慮漏れです。

📷 スクリーンショット / Screenshot

📝 その他コメント / Other Comments

@cwtickle cwtickle added bug Something isn't working func11:KeyConfig キーコンフィグ、キー定義関係 labels May 17, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Review Change Stack

Warning

Rate limit exceeded

@cwtickle has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 43 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2828f11a-b947-45a8-a623-2a92ef20af86

📥 Commits

Reviewing files that changed from the base of the PR and between cfce877 and 43c5d1f.

📒 Files selected for processing (1)
  • js/danoni_main.js
📝 Walkthrough

Walkthrough

getKeyConfigColor() in keyConfigInit() now determines its storage source conditionally based on extraKeyFlg, attempting key-specific color pattern retrieval with fallback to generic pattern when colorGroupNum === -1.

Changes

Key Configuration Color Storage

Layer / File(s) Summary
Color configuration storage reference refactoring
js/danoni_main.js
baseGroupNum calculation switches between g_localStorage and g_localKeyStorage based on g_stateObj.extraKeyFlg, and prioritizes keyCtrlPtn${currentKey} with fallback to keyCtrlPtn when retrieving color control pattern data.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • cwtickle/danoniplus#2117: Both PRs modify color group and base color reference logic in getKeyConfigColor() within keyConfigInit() in js/danoni_main.js.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main fix: addressing an issue where the initial arrow color in the key config screen was not displaying as expected, which directly matches the changeset's purpose of correcting key pattern retrieval for custom keys.
Description check ✅ Passed The description is directly related to the changeset, explaining the problem (custom key patterns not retrieved correctly), the impact (incorrect initial arrow colors), and the root cause (variable difference in custom keys, oversight from PR #2117).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/1095-keycon-color-ex

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.

@cwtickle
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@js/danoni_main.js`:
- Around line 9545-9547: The baseGroupNum calculation uses || which treats a
valid 0 pattern as falsy and falls back incorrectly; update the expression in
the block that computes baseGroupNum (referencing storageObj,
g_keyObj.currentKey, keyCtrlPtn${g_keyObj.currentKey} and keyCtrlPtn) to use
nullish coalescing (??) instead of || so that 0 is preserved as a valid index
when g_keycons.colorGroupNum === -1; ensure both optional accesses use ?? to
fall back only on null/undefined.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 18dfdea6-281e-4e4b-808a-3aa5c3f55237

📥 Commits

Reviewing files that changed from the base of the PR and between fbebc32 and cfce877.

📒 Files selected for processing (1)
  • js/danoni_main.js

Comment thread js/danoni_main.js Outdated
@cwtickle cwtickle merged commit 1a35b7a into develop May 17, 2026
4 checks passed
@cwtickle cwtickle deleted the hotfix/1095-keycon-color-ex branch May 17, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working func11:KeyConfig キーコンフィグ、キー定義関係

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant