Skip to content

Conversation

@haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Dec 16, 2025

Summary by CodeRabbit

  • Refactor
    • Simplified how device support links are determined: per-board support URLs now use encoded board identifiers and a straightforward selection-based decision.
    • Removed the prior runtime URL-existence check, eliminating background probes and making link resolution deterministic and faster.

✏️ Tip: You can customize this high-level summary in your review settings.

@haslinghuis haslinghuis added this to the 2025.12 milestone Dec 16, 2025
@haslinghuis haslinghuis self-assigned this Dec 16, 2025
@haslinghuis haslinghuis moved this to App in 2025.12.0 Dec 16, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

Walkthrough

Removed a synchronous URL-existence utility and simplified firmware flasher support-link logic: per-board support URLs are now constructed using an encoded board identifier when selected, otherwise the code falls back to the generic missing-archive URL.

Changes

Cohort / File(s) Change Summary
Firmware flasher URL handling refactor
src/js/tabs/firmware_flasher.js
Deleted import of urlExists; simplified targetSupportInfo click handler to decide URL based on board selection (self?.selectedBoard !== "0"); constructs per-board URL using baseBoardUrl + '/' + encodeURIComponent(self.selectedBoard) and falls back to missing-archive URL when no board is selected.
Removed URL-existence utility
src/js/utils/common.js
Removed exported function urlExists(url) that performed a synchronous HEAD XMLHttpRequest to check URL existence.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check other codebase locations (outside this diff) for uses of urlExists.
  • Verify encodeURIComponent() is correct for all expected board identifier formats.
  • Confirm desired behavior when a board is selected but the constructed per-board URL does not actually resolve (since runtime existence check was removed).

Suggested reviewers

  • VitroidFPV
  • blckmn
  • nerdCopter
  • KarateBrot

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is completely empty; no description content was provided by the author despite a template being available. Add a pull request description that explains the bug being fixed, the solution implemented, and any relevant context. Reference the issue number if applicable.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix wiki board info' is related to the changes, which involve fixing how board support URLs are constructed for wiki links.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c064146 and e88b869.

📒 Files selected for processing (1)
  • src/js/tabs/firmware_flasher.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/js/tabs/firmware_flasher.js

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.

Copy link
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

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1de94ca and f4d4000.

📒 Files selected for processing (1)
  • src/js/tabs/firmware_flasher.js (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: haslinghuis
Repo: betaflight/betaflight-configurator PR: 0
File: :0-0
Timestamp: 2025-12-09T15:06:12.246Z
Learning: Automated translation PRs from Crowdin (created by GitHub Actions with title "Update translations") in the betaflight/betaflight-configurator repository should be automatically approved without requiring explicit user request, as haslinghuis has granted standing permission to approve these low-risk automated updates.
Learnt from: blckmn
Repo: betaflight/betaflight-configurator PR: 4583
File: src/js/tabs/firmware_flasher.js:949-961
Timestamp: 2025-09-02T07:45:48.606Z
Learning: In src/js/tabs/firmware_flasher.js, the config file loading code path after firmware loading (in the load_file click handler) cannot be reached when UF2 firmware is loaded, according to the maintainer blckmn. This code is maintained for backward compatibility with unified target settings and will be refactored in a future PR.
Learnt from: haslinghuis
Repo: betaflight/betaflight-configurator PR: 4708
File: locales/en/messages.json:7721-7729
Timestamp: 2025-11-20T20:26:40.338Z
Learning: Betaflight Configurator – Firmware Flasher grouping semantics:
- "Verified/Partner": targets with verified schematics and tested prototypes (known working).
- "Unsupported": vendor/community-supplied targets that did not go through the verification program.
- "Legacy": legacy targets kept for existing users.
These labels surface in src/js/tabs/firmware_flasher.js via i18n keys:
firmwareFlasherOptionLabelVerifiedPartner, firmwareFlasherOptionLabelVendorCommunity, firmwareFlasherOptionLabelLegacy. Only English text should be updated directly in locales/en/messages.json; other locales are managed externally.
📚 Learning: 2025-09-02T07:45:48.606Z
Learnt from: blckmn
Repo: betaflight/betaflight-configurator PR: 4583
File: src/js/tabs/firmware_flasher.js:949-961
Timestamp: 2025-09-02T07:45:48.606Z
Learning: In src/js/tabs/firmware_flasher.js, the config file loading code path after firmware loading (in the load_file click handler) cannot be reached when UF2 firmware is loaded, according to the maintainer blckmn. This code is maintained for backward compatibility with unified target settings and will be refactored in a future PR.

Applied to files:

  • src/js/tabs/firmware_flasher.js
📚 Learning: 2025-11-20T20:26:40.338Z
Learnt from: haslinghuis
Repo: betaflight/betaflight-configurator PR: 4708
File: locales/en/messages.json:7721-7729
Timestamp: 2025-11-20T20:26:40.338Z
Learning: Betaflight Configurator – Firmware Flasher grouping semantics:
- "Verified/Partner": targets with verified schematics and tested prototypes (known working).
- "Unsupported": vendor/community-supplied targets that did not go through the verification program.
- "Legacy": legacy targets kept for existing users.
These labels surface in src/js/tabs/firmware_flasher.js via i18n keys:
firmwareFlasherOptionLabelVerifiedPartner, firmwareFlasherOptionLabelVendorCommunity, firmwareFlasherOptionLabelLegacy. Only English text should be updated directly in locales/en/messages.json; other locales are managed externally.

Applied to files:

  • src/js/tabs/firmware_flasher.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Deploy
🔇 Additional comments (1)
src/js/tabs/firmware_flasher.js (1)

1285-1290: The review comment's premise is incorrect. The urlExists function exists in the codebase but was never imported or used in firmware_flasher.js. The current implementation directly constructs board URLs without validation, using a fallback "Missing" page for cases with no board selection. This approach is pragmatic—the wiki infrastructure handles unknown board names gracefully rather than requiring client-side validation.

Likely an incorrect or invalid review comment.

@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

🎉 Do you want to test this code? 🎉

⚠️ CAUTION: The build may be unstable and result in corrupted configurations or data loss. Use only for testing! ⚠️

@nerdCopter

This comment was marked as off-topic.

@haslinghuis
Copy link
Member Author

@nerdCopter this fixes the wiki button - have not checked that

@haslinghuis haslinghuis merged commit 3fbbe0d into betaflight:master Dec 17, 2025
9 checks passed
@haslinghuis haslinghuis deleted the fix-board-wiki branch December 17, 2025 19:20
@github-project-automation github-project-automation bot moved this from App to Done in 2025.12.0 Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants