Skip to content

Fix adapter device ID not incrementing when adding new devices#32

Open
jgeudens wants to merge 1 commit intomasterfrom
claude/fix-device-id-increment-uJayt
Open

Fix adapter device ID not incrementing when adding new devices#32
jgeudens wants to merge 1 commit intomasterfrom
claude/fix-device-id-increment-uJayt

Conversation

@jgeudens
Copy link
Copy Markdown
Member

When adding a new device via AdapterDeviceSettings, the new tab always received the adapter's hardcoded default id (e.g. 1) instead of a unique one, allowing multiple devices to share the same id. No corresponding SettingsModel device was created either, breaking the invariant that adapter-config device ids must match SettingsModel device ids.

Fix handleAddTab() to call addNewDevice() for a unique id and set the adapter on the resulting SettingsModel entry. Also fix onAdapterChanged() in DeviceConfigTab to preserve the existing device id when the user switches the protocol adapter, preventing the unique id from being overwritten by the new adapter's defaults.

https://claude.ai/code/session_012tQA6XhU6TKDgqzUwzJqx1

When adding a new device via AdapterDeviceSettings, the new tab always
received the adapter's hardcoded default id (e.g. 1) instead of a unique
one, allowing multiple devices to share the same id. No corresponding
SettingsModel device was created either, breaking the invariant that
adapter-config device ids must match SettingsModel device ids.

Fix handleAddTab() to call addNewDevice() for a unique id and set the
adapter on the resulting SettingsModel entry. Also fix onAdapterChanged()
in DeviceConfigTab to preserve the existing device id when the user
switches the protocol adapter, preventing the unique id from being
overwritten by the new adapter's defaults.

https://claude.ai/code/session_012tQA6XhU6TKDgqzUwzJqx1
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 50 seconds.

⌛ 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0931af41-7667-4262-ab2f-c76ff4095286

📥 Commits

Reviewing files that changed from the base of the PR and between 705c8f3 and 6c41b0e.

📒 Files selected for processing (4)
  • src/customwidgets/deviceconfigtab.cpp
  • src/dialogs/adapterdevicesettings.cpp
  • tests/dialogs/tst_adapterdevicesettings.cpp
  • tests/dialogs/tst_adapterdevicesettings.h
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-device-id-increment-uJayt

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.

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