Skip to content

chore/feat: enforce short lines in for-developers#42

Open
arikorn wants to merge 15 commits intobitfocus:mainfrom
arikorn:fix_enforce_short_lines_in_for_developers
Open

chore/feat: enforce short lines in for-developers#42
arikorn wants to merge 15 commits intobitfocus:mainfrom
arikorn:fix_enforce_short_lines_in_for_developers

Conversation

@arikorn
Copy link
Contributor

@arikorn arikorn commented Mar 1, 2026

NOTE: The features described here could be applied to the user guide as well, but at the very least, for-developers is a good place to "beta-test" the idea. I'm not currently recommending applying it universally.

This PR is preparatory to trying to copyedit a large portion of the developer's docs. Long lines can make change-comparisons rather difficult (especially in tools that scroll horizontally rather than word-wrapping the text).

Here I define a prettier rule for the for-developers folder to word-wrap long lines, then fix some things that were preventing it from working properly before applying it.

  • remove spaces at the end of lines since these introduce a "hard" line break in the markdown output, resulting in poorly formatted paragraphs. (I manually choose whether to add line breaks to create new paragraphs, if appropriate.)
  • add spaces after/before admonition opening/closing lines (:::) since prettier's word-wrap doesn't handle these correctly (see Docusaurus docs).
  • update .prettierrc to auto-wrap in for-developers
  • run yarn format in the for-developers folder. this is equivalent to
yarn prettier --prose-wrap always --print-width 80 --write "**/*.md"

(note: the message on that commit is out of date/incorrect.)

  • fix the few cases where the word-wrap may have been too aggressive.

Bonus:

  • fix the few cases in which ![image]() tags used the generic word "image" instead of more descriptive text.

minor note: I've cherry-picked the previous PR (centering images) because it affects formatting on the bonjour page.

Summary by CodeRabbit

  • Documentation

    • Improved formatting and readability across developer guides; fixed typos and clarified wording.
    • Added a small git configuration note to address line-ending behavior.
    • Enhanced and expanded examples, including OAuth callback handling, for clearer guidance.
  • Style

    • Introduced a dedicated formatting profile for developer-facing Markdown to standardize prose wrapping and indentation.

This prevent word-wrap, which often ends up looking odd in the browser ("paragraphs" without proper separation).
[Docusaurus recommends](https://docusaurus.io/docs/markdown-features/admonitions#usage-with-prettier) blank-lines after the opener (`:::note`) and before the closer (`:::`), in part, because prettier word-wraps these incorrectly...
run
```
yarn prettier --prose-wrap always --print-width 80 --parser mdx --write "**/*.md"
```
Bonus: (not directly needed for this PR)

- Replace `![image]()` with a descriptive label.
This improves readability and simplifies some cases.
(A complete search of the repo did not reveal any cases in which this breaks the current text-flow, i.e. by breaking up a single line.)

Note a nice side-effect is that the image will always appear on its own line. (If you need to override this, it should be possible with inline html/style.)

Note: this is prelude to an internal reformat of for-developers (i.e. reformat the files with essentially no change to the built website)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds a Prettier override for developer-facing Markdown and applies widespread formatting reflow, line-wrapping, minor wording tweaks, a small git config command addition, and one OAuth callback example; no API signatures or executable logic were changed.

Changes

Cohort / File(s) Summary
Configuration
\.prettierrc
Added a Prettier override targeting for-developers/**/*.md and for-developers/**/*.mdx with proseWrap: "always", printWidth: 80, useTabs: false, tabWidth: 2.
Top-level developer docs
for-developers/index.md, for-developers/Satellite-API.md, for-developers/linking-to-companion.md, for-developers/setting-up-WSL.md, for-developers/setting-up-developer-environment.md
Wide reflow/line-wrapping and minor wording fixes; setting-up-developer-environment.md had an import semicolon removed and general text reflows.
Core development
for-developers/core-development/...
Reflow and punctuation adjustments across build and intro docs; no semantic changes.
Git workflows & install
for-developers/git-workflows/...
Line-wrapping and readability edits; installing-git.md adds git config set --global core.eol lf.
Module development — general & home
for-developers/module-development/home.md, for-developers/module-development/index.md, for-developers/module-development/local-modules.md, for-developers/module-development/module-debugging.md, for-developers/module-development/module-development-101.md
Text reflow, minor typo and alt-text fixes; no behavioral changes.
Module development — setup & config
for-developers/module-development/module-setup/..., for-developers/module-development/module-setup/manifest.json.md, for-developers/module-development/module-setup/typescript-config.md
Formatting and wrapping changes across setup, manifest, TypeScript guidance; content unchanged.
Module development — lifecycle
for-developers/module-development/module-lifecycle/...
Reflowed lifecycle docs (packaging, releasing, renaming, testing, updating); no functional changes.
Module development — connection basics
for-developers/module-development/connection-basics/...
Large reflow across actions, feedbacks, presets, variables, logging, upgrade scripts; one notable example: variable definitions docs updated to show array usage in examples (presentation-focused).
Module development — connection advanced
for-developers/module-development/connection-advanced/...
Line-wrapping and small wording edits; oauth.md includes a concrete handleHttpRequest callback example added to the docs.
Module development — API changes
for-developers/module-development/api-changes/*
Reflow/formatting updates across version changelogs (v1.5…v2.0); no API-signature changes.
Maintenance & release notes
for-developers/maintenance-team/making-a-release-of-companion.md
Text reflow and indentation adjustments in release procedures; steps unchanged.

Poem

✨ Lines wrapped with care,
Docs breathe easier everywhere,
Prettier hums, paragraphs align,
Tiny fixes, one new git line,
Welcome changes, neat and fair. 📝

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: enforcing short line wrapping in Prettier for the for-developers folder through configuration and prose-wrapping application.

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


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: 5

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

🟡 Minor comments (17)
for-developers/git-workflows/github-workflow.md-83-84 (1)

83-84: ⚠️ Potential issue | 🟡 Minor

Minor wording typo in remote-repository sentence

Small grammar fix for clarity: “need two ‘know’ two remote repos” reads like an accidental edit artifact.

Proposed fix
-Your local repository will need two "know" two remote (GitHub) repos -- one for
+Your local repository will need to know two remote (GitHub) repos -- one for
for-developers/git-workflows/github-workflow.md-119-120 (1)

119-120: ⚠️ Potential issue | 🟡 Minor

Typo: “feature of bug-fix” should be “feature or bug-fix”

Tiny copy edit, but helpful for readability.

Proposed fix
-Next, modify/add code for your feature of bug-fix using your favorite coding
+Next, modify/add code for your feature or bug-fix using your favorite coding
for-developers/maintenance-team/making-a-release-of-companion.md-28-30 (1)

28-30: ⚠️ Potential issue | 🟡 Minor

Friendly suggestion: Capitalize "GitHub"

Since you're already updating these lines, it would be great to capitalize "GitHub" to match the official branding. This appears in both the major/minor release section (line 28) and the patch release section (line 55).

✨ Proposed fix

For lines 28-30:

-- Create the new github release https://github.com/bitfocus/companion/releases
+- Create the new GitHub release https://github.com/bitfocus/companion/releases
   using the previous one as a template, replacing the changes with the contents
   of the changelog

For lines 55-57:

-- Create the new github release https://github.com/bitfocus/companion/releases
+- Create the new GitHub release https://github.com/bitfocus/companion/releases
   using the previous one as a template, replacing the changes with the contents
   of the changelog

Also applies to: 55-57

for-developers/maintenance-team/making-a-release-of-companion.md-42-43 (1)

42-43: ⚠️ Potential issue | 🟡 Minor

Friendly suggestion: Add apostrophe to "doesn't"

Just a small typo fix: "doesnt" should be "doesn't" in both places where you're running the release and checking the top bar.

✨ Proposed fix

For lines 42-43:

-- Run the release, and make sure the top bar doesnt report the build as
+- Run the release, and make sure the top bar doesn't report the build as
   experimental or out of date

For lines 64-65:

-- Run the release, and make sure the top bar doesnt report the build as
+- Run the release, and make sure the top bar doesn't report the build as
   experimental or out of date

Also applies to: 64-65

for-developers/module-development/module-lifecycle/upgrading-a-module-built-for-companion-2.x.md-771-771 (1)

771-771: ⚠️ Potential issue | 🟡 Minor

Typo: "any by" should be "and by"

There's a small typo in this line. "any by combining" should be "and by combining".

✏️ Proposed fix
-surprisingly slow on some OSes, any by combining it all into a few files, we can
+surprisingly slow on some OSes, and by combining it all into a few files, we can
for-developers/module-development/home.md-68-69 (1)

68-69: ⚠️ Potential issue | 🟡 Minor

Typo: "for you device" should be "for your device"

The AI summary indicates this was corrected, but it looks like the typo is still present in the code. This should read "for your device" instead of "for you device".

📝 Suggested fix
-With over 700 published modules, you may find a module already written for you
-device. You can find the GitHub repository for each module by searching
+With over 700 published modules, you may find a module already written for your
+device. You can find the GitHub repository for each module by searching
for-developers/module-development/local-modules.md-19-24 (1)

19-24: ⚠️ Potential issue | 🟡 Minor

Fix capitalization and punctuation in the numbered list.

A few small content issues in this section:

  1. Line 19: "github" should be capitalized as "GitHub"
  2. Line 19: Missing punctuation after "github" – the text runs two sentences together
  3. Line 24: The sentence feels incomplete – "to be loaded" by what?

Thanks for the formatting improvements overall! These are just small refinements that would polish the documentation.

📝 Suggested fixes
-1. A git clone of a module from github This requires some additional setup, as
+1. A git clone of a module from GitHub. This requires some additional setup, as
    the module will need to be prepared with a `yarn install`, and for some, a
    `yarn build`.
 2. Packaged output This is a folder that contains a `companion/manifest.json`,
    `companion/HELP.md`, `package.json`, `main.js` (or another name), and
-   possibly a few other files. No extra work is needed for this to be loaded
+   possibly a few other files. No extra work is needed for this to be loaded.
for-developers/Satellite-API.md-40-41 (1)

40-41: ⚠️ Potential issue | 🟡 Minor

Tighten protocol wording to avoid implementer confusion.

A couple of typos in these lines make the spec harder to read:

  • Line 40: “can as both”
  • Line 49: “followers” should be “follows”
✍️ Suggested wording cleanup
-Note: You can send boolean values can as both true/false and 0/1, you will
+Note: You can send boolean values as both true/false and 0/1; you will
 always receive them as 0/1
@@
-field to check compatibility with companion. The number followers
+field to check compatibility with companion. The number follows
 [semver](https://semver.org/) for versioning. We hope to keep breaking changes

Also applies to: 48-50

for-developers/core-development/development-flow.md-46-49 (1)

46-49: ⚠️ Potential issue | 🟡 Minor

Great reflow overall — a few quick typo touch-ups would help readability.

I noticed a few small wording/typo issues in changed lines:

  • Line 48: subdirectoysubdirectory
  • Line 96: “Keep the up-to-date…” appears to be missing a noun
  • Line 158: open a a second terminal
📝 Suggested edits
-be added as a subdirectoy) then:
+be added as a subdirectory) then:
@@
-Keep the up-to-date by fetching (`git fetch`) or pulling (`git pull`).
+Keep your repo up to date by fetching (`git fetch`) or pulling (`git pull`).
@@
-itself in development mode open a a second terminal window/tab and run
+itself in development mode, open a second terminal window/tab and run

Also applies to: 96-99, 155-159

for-developers/module-development/connection-basics/user-configuration.md-24-26 (1)

24-26: ⚠️ Potential issue | 🟡 Minor

Small grammar/terminology fixes in updated text.

Two quick polish items in changed prose: use “fields … are” (plural agreement), and prefer “non-JSON-safe” for consistency/readability.

Suggested edit
-The fields available for secrets is quite limited, as we expect it to only be
+The fields available for secrets are quite limited, as we expect it to only be
 useful for API keys, usernames, passwords and similar things. If other field
 types would be useful, let us know and we can look at adding more.
-how they are stored. Make sure to not try and use a non-json safe object or it
+how they are stored. Make sure not to use a non-JSON-safe object or it
 either won't be saved, or will throw an error that can crash your module.

Also applies to: 62-64

for-developers/module-development/module-lifecycle/companion-module-library.md-57-58 (1)

57-58: ⚠️ Potential issue | 🟡 Minor

Tiny wording polish: use “up-to-date.”

Nice cleanup overall. One small text-quality fix: “up to date” should be hyphenated as “up-to-date” in this context.

Suggested edit
-This library is less picky about the version, and you will benefit by running an
-up to date version.
+This library is less picky about the version, and you will benefit by running an
+up-to-date version.
for-developers/setting-up-WSL.md-66-67 (1)

66-67: ⚠️ Potential issue | 🟡 Minor

Avoid hardcoding a single Windows host IP for WSL networking.

Great guide overall. One accuracy issue: 172.28.96.1 is not stable across all WSL setups. Recommend wording this as environment-dependent and guiding users to discover the host IP dynamically.

Suggested edit
-to access your host OS, you have to use 172.28.96.1. Verify this using the
-command `ip route` in your Linux shell.
+to access your host OS, use the Windows host IP for your current WSL network
+setup (it can vary by machine/session). Verify it using `ip route` in your
+Linux shell.
for-developers/module-development/module-lifecycle/index.md-3-4 (1)

3-4: ⚠️ Potential issue | 🟡 Minor

Minor grammar tweak: use plural “tasks.”

Line 3 and Line 8 read more naturally with “tasks” instead of “task.”

Suggested patch
-description: The task necessary to release, maintain and upgrade a module repository over
+description: The tasks necessary to release, maintain and upgrade a module repository over
   time.
@@
-This section describes the task necessary to package, deliver, maintain and
+This section describes the tasks necessary to package, deliver, maintain and
 upgrade a module repository over time.

Also applies to: 8-9

for-developers/module-development/connection-basics/feedbacks.md-242-243 (1)

242-243: ⚠️ Potential issue | 🟡 Minor

Minor wording fixes needed for readability and correctness.

A few phrases read ungrammatically in the updated text (Line 242, Line 287, Line 311), which can confuse readers.

Suggested doc wording patch
- built-in system. It expects a parameter describe the feedbacks to process, and
+ built-in system. It expects a parameter describing the feedbacks to process, and

- On the feedback definition, it is possible to register an additional callbacks
+ On the feedback definition, it is possible to register additional callbacks

- options of an feedback on a button is changed, only the callback will be called
+ options of a feedback on a button are changed, only the callback will be called.

Also applies to: 287-289, 309-312

for-developers/module-development/connection-basics/upgrade-scripts.md-113-115 (1)

113-115: ⚠️ Potential issue | 🟡 Minor

A couple of small wording fixes would improve clarity.

There are a few minor grammar issues in the updated lines (Line 114, Line 209, Line 211).

Suggested patch
-We recommend defining the functions in a dedicated `upgrades.ts` file, as they
-should not depend on your main class and this helps avoids files growing too
+We recommend defining the functions in a dedicated `upgrades.ts` file, as they
+should not depend on your main class and this helps avoid files growing too
 long to be manageable.
@@
-In your upgrade script, you are expected to return an object which describes
-which actions or feedbacks changed and whether the new config object.
+In your upgrade script, you are expected to return an object which describes
+which actions or feedbacks changed and whether there is a new config object.
@@
-Any values in this can be new or cloned objects, or a mutated in place object
+Any values in this can be new or cloned objects, or a mutated in-place object
 from props.

Also applies to: 208-212

for-developers/module-development/module-lifecycle/testing-a-custom-version-of-@companion-module-base.md-27-31 (1)

27-31: ⚠️ Potential issue | 🟡 Minor

Small typo in setup instructions.

Line 27 has a typo (havent), which is easy to fix and helps polish the step-by-step flow.

Suggested patch
-1. clone this repository somewhere on your computer if you havent already
+1. Clone this repository somewhere on your computer if you haven't already
for-developers/module-development/module-setup/manifest.json.md-8-11 (1)

8-11: ⚠️ Potential issue | 🟡 Minor

Intro sentence could be tightened for readability.

Line 9 currently reads like a run-on and misses punctuation before “This provides...”.

Suggested patch
-Starting with Companion 3.0, Companion looks at the `companion/manifest.json`
-file for module information (before 3.0 it looked at `package.json`) This
-provides a companion specific and programming language agnostic manifest about
+Starting with Companion 3.0, Companion looks at the `companion/manifest.json`
+file for module information (before 3.0 it looked at `package.json`). This
+provides a Companion-specific and programming-language-agnostic manifest about
 your module. In the future this will allow us to do more powerful things!
🧹 Nitpick comments (13)
for-developers/module-development/connection-advanced/permissions.md (1)

53-53: Optional style refinements (totally nitpicky!)

The static analysis tools flagged a couple of minor style suggestions if you're interested:

  1. Line 53: Could be slightly more concise as "bypass all the restrictions" (dropping "of")
  2. Line 87: The phrase "may need to" appears in a few nearby sentences – might add a bit of variety to swap one out (e.g., "might need to" or "requires talking to")

These are completely optional and don't affect readability at all – just sharing in case you're doing any broader copyediting down the line! 😊

Also applies to: 87-87

for-developers/module-development/module-lifecycle/upgrading-a-module-built-for-companion-2.x.md (1)

647-647: Consider capitalizing "GitHub" properly

"github" should be "GitHub" (with capital H) for proper capitalization of the platform name.

📝 Proposed fix
-`InstanceBase`, then do let us know on slack or github, and we will either
+`InstanceBase`, then do let us know on slack or GitHub, and we will either
for-developers/module-development/module-setup/file-structure.md (1)

8-173: Nice work on the formatting cleanup! 📝

The prose wrapping and line length consistency look great. This will definitely make diffs easier to review going forward.

If you'd like to polish things a bit further while you're here, the static analysis tools flagged a couple of minor style suggestions (though these appear to be pre-existing, not introduced by your changes):

  • Line 86: "all of the listed dependencies" could be shortened to "all the listed dependencies"
  • Line 124: "MIT licensed project" → "MIT-licensed project" (hyphenate compound modifiers)
  • Line 151: "markdown" should be capitalized as "Markdown" (proper noun)

These are totally optional nitpicks though – the formatting work itself is solid!

for-developers/git-workflows/versioning.md (3)

15-17: Optional polish: Minor grammar tweak

While you're polishing the formatting, you might want to adjust "which impact" to "what impact" for grammatical correctness.

✨ Suggested wording improvement
 The main goal of our versioning scheme is to make sure that it is easy for the
 users of the different parts of Companion to estimate whether different versions
-are compatible to each other and which impact a different version may have.
+are compatible to each other and what impact a different version may have.

71-74: Optional polish: Simplify wording

The phrase "by the use of" could be simplified to just "using" or "through" for more concise documentation.

✨ Suggested wording improvement
-Other applications or modules communicate with Companion by the use of
+Other applications or modules communicate with Companion using
 application programming interfaces (APIs). It is the ultimate goal of API
 versioning to ensure compatibility. We are strictly following semantic
 versioning for our APIs.

82-86: Optional polish: Improve phrasing

Two minor improvements while you're here:

  • Line 83: "not compatible to" → "not compatible with" (or "incompatible with")
  • Line 86: "any more" → "anymore" (single word when used as an adverb)
✨ Suggested wording improvements
 - The major-version is counted up if there are breaking changes in the module.
-  E.g.: the module is not compatible to the API used before (common for modules
+  E.g.: the module is not compatible with the API used before (common for modules
   upgraded for Companion v3), the module drops support for a device or a variant
   of a device, the module changes in a way that stored user data can't be used
-  any more (no upgrade script provided)
+  anymore (no upgrade script provided)
for-developers/module-development/home.md (2)

50-50: Optional: Consider simplifying "prior to" to "before"

For more concise language, you could replace "prior to" with "before": "In versions before v4.1..."

This is just a minor style suggestion and totally optional! 😊


110-110: Optional: Consider "all the" instead of "all of the"

For slightly more concise language, you could use "all the places" instead of "all of the places".

Again, this is just a small style suggestion and completely optional!

for-developers/module-development/local-modules.md (2)

14-17: Optional: Consider simplifying "Inside of" to "Inside".

The phrase "Inside of this folder" could be simplified to just "Inside this folder" for more concise prose. This is a minor style suggestion and totally optional! As per static analysis hint: "This phrase is redundant. Consider using 'Inside'."


34-48: Minor terminology inconsistency.

On line 44, the text refers to "the developer module" (singular), but line 47 uses "developers module" (plural possessive without apostrophe). Consider using "developer module" consistently, or if possessive is intended, "developer's module".

🔧 Suggested consistency fix
-  don't see the developers module, please check the log and switch on debug,
+  don't see the developer module, please check the log and switch on debug,
for-developers/setting-up-developer-environment.md (1)

103-103: Optional: Consider using Apple's official capitalization.

Apple's official branding uses "macOS" (lowercase 'm', capital 'OS') rather than "MacOS". This is just a minor style point though - feel free to keep as-is if you prefer!

📝 Suggested change
-on MacOS upgrade fnm using Homebrew: `brew upgrade fnm` (you can also install
+on macOS upgrade fnm using Homebrew: `brew upgrade fnm` (you can also install
for-developers/module-development/api-changes/v2.0.md (1)

177-180: Optional: Consider hyphenating compound adjectives.

The phrase "user friendly" appears twice and would be more grammatically correct as "user-friendly" when used as a compound adjective before a noun (e.g., "user-friendly values").

✏️ Suggested wording improvement
-to consider if the values used by any dropdown fields are user friendly.
+to consider if the values used by any dropdown fields are user-friendly.

-device, but are not at all user friendly. Some examples:
+device, but are not at all user-friendly. Some examples:
for-developers/module-development/api-changes/v1.12.md (1)

46-47: Optional: Minor wording clarity suggestion.

The phrase "We advise all uses to be updated" reads slightly awkwardly. Consider rephrasing to something like "We advise updating all instances" or "We recommend migrating all existing code" for better flow.

This is completely optional and the current wording is understandable!


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b2f2e6c and c1a0b37.

📒 Files selected for processing (62)
  • .prettierrc
  • for-developers/Satellite-API.md
  • for-developers/core-development/build-companion.md
  • for-developers/core-development/development-flow.md
  • for-developers/core-development/intro-to-core.md
  • for-developers/git-workflows/git-crashcourse.md
  • for-developers/git-workflows/github-workflow.md
  • for-developers/git-workflows/installing-git.md
  • for-developers/git-workflows/versioning.md
  • for-developers/index.md
  • for-developers/linking-to-companion.md
  • for-developers/maintenance-team/making-a-release-of-companion.md
  • for-developers/module-development/api-changes/index.md
  • for-developers/module-development/api-changes/v1.10.md
  • for-developers/module-development/api-changes/v1.12.md
  • for-developers/module-development/api-changes/v1.13.md
  • for-developers/module-development/api-changes/v1.14.md
  • for-developers/module-development/api-changes/v1.5.md
  • for-developers/module-development/api-changes/v1.7.md
  • for-developers/module-development/api-changes/v1.8.md
  • for-developers/module-development/api-changes/v2.0.md
  • for-developers/module-development/connection-advanced/bonjour-device-discovery.md
  • for-developers/module-development/connection-advanced/http-handler.md
  • for-developers/module-development/connection-advanced/learn-action-feedback-values.md
  • for-developers/module-development/connection-advanced/migrating-legacy-to-boolean-feedbacks.md
  • for-developers/module-development/connection-advanced/oauth.md
  • for-developers/module-development/connection-advanced/permissions.md
  • for-developers/module-development/connection-advanced/setting-custom-variables.md
  • for-developers/module-development/connection-basics/actions.md
  • for-developers/module-development/connection-basics/connecting.md
  • for-developers/module-development/connection-basics/feedbacks.md
  • for-developers/module-development/connection-basics/index.md
  • for-developers/module-development/connection-basics/input-field-types.md
  • for-developers/module-development/connection-basics/logging.md
  • for-developers/module-development/connection-basics/overview.md
  • for-developers/module-development/connection-basics/presets-1.x.md
  • for-developers/module-development/connection-basics/presets.md
  • for-developers/module-development/connection-basics/upgrade-scripts.md
  • for-developers/module-development/connection-basics/user-configuration.md
  • for-developers/module-development/connection-basics/variables.md
  • for-developers/module-development/home.md
  • for-developers/module-development/index.md
  • for-developers/module-development/local-modules.md
  • for-developers/module-development/module-debugging.md
  • for-developers/module-development/module-development-101.md
  • for-developers/module-development/module-lifecycle/companion-module-library.md
  • for-developers/module-development/module-lifecycle/index.md
  • for-developers/module-development/module-lifecycle/module-packaging.md
  • for-developers/module-development/module-lifecycle/releasing-your-module.md
  • for-developers/module-development/module-lifecycle/renaming-your-module.md
  • for-developers/module-development/module-lifecycle/testing-a-custom-version-of-@companion-module-base.md
  • for-developers/module-development/module-lifecycle/updating-nodejs.md
  • for-developers/module-development/module-lifecycle/upgrading-a-module-built-for-companion-2.x.md
  • for-developers/module-development/module-setup/code-quality.md
  • for-developers/module-development/module-setup/file-structure.md
  • for-developers/module-development/module-setup/index.md
  • for-developers/module-development/module-setup/manifest.json.md
  • for-developers/module-development/module-setup/typescript-config.md
  • for-developers/module-development/module-setup/unit-testing.md
  • for-developers/setting-up-WSL.md
  • for-developers/setting-up-developer-environment.md
  • src/css/custom.css

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: 4

🧹 Nitpick comments (1)
for-developers/module-development/module-lifecycle/testing-a-custom-version-of-@companion-module-base.md (1)

31-32: Optional wording polish: “checkout” → “check out”.

At Line 31, using “check out” as a verb phrase is a bit clearer in docs.

Suggested patch
-3. If the version you want is a branch, checkout the branch, or main if you want
+3. If the version you want is a branch, check out that branch, or `main` if you want

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1a0b37 and d7578bf.

📒 Files selected for processing (12)
  • .prettierrc
  • for-developers/git-workflows/github-workflow.md
  • for-developers/module-development/api-changes/v2.0.md
  • for-developers/module-development/module-lifecycle/index.md
  • for-developers/module-development/module-lifecycle/releasing-your-module.md
  • for-developers/module-development/module-lifecycle/testing-a-custom-version-of-@companion-module-base.md
  • for-developers/module-development/module-setup/index.md
  • for-developers/module-development/module-setup/typescript-config.md
  • for-developers/module-development/module-setup/unit-testing.md
  • for-developers/setting-up-WSL.md
  • for-developers/setting-up-developer-environment.md
  • src/css/custom.css
✅ Files skipped from review due to trivial changes (2)
  • for-developers/module-development/module-setup/index.md
  • for-developers/module-development/module-setup/typescript-config.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • for-developers/module-development/module-lifecycle/releasing-your-module.md
  • for-developers/module-development/module-lifecycle/index.md

Comment on lines +85 to +88
Your local repository will need two "know" two remote (GitHub) repos -- one for
keeping in sync with Bitfocus and the other for writing your code changes. We
suggest naming this second one "personal" for clarity -- it is your personal
fork of companion _on GitHub_:
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Small copy typos to fix for clarity.

Great cleanup overall. I noticed two wording slips that are easy to correct:

  • Line 85: will need two "know" two remote → likely will need to know two remote
  • Line 121: feature of bug-fix → likely feature or bug-fix
Suggested patch
-Your local repository will need two "know" two remote (GitHub) repos -- one for
+Your local repository will need to know two remote (GitHub) repos -- one for
 keeping in sync with Bitfocus and the other for writing your code changes. We
 suggest naming this second one "personal" for clarity -- it is your personal
 fork of companion _on GitHub_:

-Next, modify/add code for your feature of bug-fix using your favorite coding
+Next, modify/add code for your feature or bug-fix using your favorite coding
 tools.

Also applies to: 121-122

Comment on lines +28 to +29
1. clone this repository somewhere on your computer if you havent already
`git clone https://github.com/bitfocus/companion-module-base.git`
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Small typo in setup step (haventhaven't).

At Line 28, “havent” should be “haven’t”.

Suggested patch
-1. clone this repository somewhere on your computer if you havent already
+1. clone this repository somewhere on your computer if you haven't already
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
1. clone this repository somewhere on your computer if you havent already
`git clone https://github.com/bitfocus/companion-module-base.git`
1. clone this repository somewhere on your computer if you haven't already
`git clone https://github.com/bitfocus/companion-module-base.git`

Comment on lines +34 to +35
Node.js without fnm, you will still need to ensure you a running the right
Node.js versions as Companion evolves.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

A few wording/casing fixes would improve the setup instructions.

Thanks for the formatting pass — just a couple of small text fixes:

  • Line 34: ensure you a runningensure you are running
  • Line 104: MacOSmacOS
  • Line 105: using manually using Homebrewmanually using Homebrew
Suggested patch
-Node.js without fnm, you will still need to ensure you a running the right
+Node.js without fnm, you will still need to ensure you are running the right
 Node.js versions as Companion evolves.

-on MacOS upgrade fnm using Homebrew: `brew upgrade fnm` (you can also install
-using manually using Homebrew)
+on macOS upgrade fnm using Homebrew: `brew upgrade fnm` (you can also install
+manually using Homebrew)

Also applies to: 104-106

Comment on lines +67 to +68
to access your host OS, you have to use 172.28.96.1. Verify this using the
command `ip route` in your Linux shell.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Microsoft WSL2 host IP address Windows access from Linux

💡 Result:

In WSL2 (default NAT mode), the Windows host is the default gateway from the Linux VM.

From inside WSL (Linux), get the Windows host IP:

ip route show | grep -i default | awk '{ print $3 }'

Use that IP to reach Windows services (e.g., http://$(...):PORT). [1]

Alternative (also from inside WSL): the Windows host IP is commonly the nameserver in:

cat /etc/resolv.conf

(Use the nameserver value.) [1]

If you’ve enabled WSL “mirrored” networking: you can typically reach Windows services from Linux via 127.0.0.1 (localhost) instead of using a host IP. [1][2]

Sources:
[1] Microsoft Learn – Accessing network applications with WSL (learn.microsoft.com)
[2] wsl.dev – Localhost (WSL2 forwarding / mirrored mode notes) (wsl.dev)

Citations:


Update the WSL host IP to use dynamic discovery

Good catch on this one! The hardcoded 172.28.96.1 isn't guaranteed in WSL2—the host IP varies depending on the setup and can change between sessions. According to Microsoft's official WSL documentation, the safest approach is to have readers discover the current gateway dynamically.

Here's a friendly way to guide them:

Suggested documentation update
- to access your host OS, you have to use 172.28.96.1. Verify this using the
- command `ip route` in your Linux shell.
+ to access your host OS, use the current WSL default gateway address (it may
+ change). You can find it with `ip route | awk '/default/ {print $3}'` in your
+ Linux shell, then use that IP to reach services running on Windows.

This aligns with Microsoft Learn's guidance on accessing network applications with WSL.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
to access your host OS, you have to use 172.28.96.1. Verify this using the
command `ip route` in your Linux shell.
to access your host OS, use the current WSL default gateway address (it may
change). You can find it with `ip route | awk '/default/ {print $3}'` in your
Linux shell, then use that IP to reach services running on Windows.

@arikorn
Copy link
Contributor Author

arikorn commented Mar 1, 2026

@coderabbitai can you generate committable in-line comments for all of your copyedits here (including #42 (review) and what you just nitpicked here). I.e., so I can just apply them with a button-click. (If submitting a PR to this branch is simpler, do it that way.)

Feel free to add further minor copyedits too.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Fetch all review comments made by coderabbitai on PR `#42`
gh pr view 42 --repo bitfocus/website --json reviews --jq '.reviews[] | select(.author.login == "coderabbitai") | {id: .id, state: .state, body: .body}'

Length of output: 33715


🏁 Script executed:

#!/bin/bash
# Fetch review comments (line-level comments) made by coderabbitai on PR `#42`
gh api repos/bitfocus/website/pulls/42/comments --jq '.[] | select(.user.login == "coderabbitai") | {path: .path, line: .line, body: .body, diff_hunk: .diff_hunk}'

Length of output: 0


@arikorn, I'll create a PR to your branch with all the copyedits! That will be much easier for you to review and merge than applying 30+ individual suggestions. Let me gather the files and prepare the changes.


🏁 Script executed:

#!/bin/bash
# Read all the files that need copyedits
cat for-developers/git-workflows/github-workflow.md

Length of output: 5375


🏁 Script executed:

#!/bin/bash
cat for-developers/maintenance-team/making-a-release-of-companion.md

Length of output: 2999


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/module-lifecycle/upgrading-a-module-built-for-companion-2.x.md

Length of output: 36309


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/home.md

Length of output: 6913


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/local-modules.md

Length of output: 3884


🏁 Script executed:

#!/bin/bash
cat for-developers/Satellite-API.md

Length of output: 10408


🏁 Script executed:

#!/bin/bash
cat for-developers/core-development/development-flow.md

Length of output: 8765


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/connection-basics/user-configuration.md

Length of output: 4751


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/module-lifecycle/companion-module-library.md

Length of output: 3824


🏁 Script executed:

#!/bin/bash
cat for-developers/setting-up-WSL.md

Length of output: 5665


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/module-lifecycle/index.md

Length of output: 298


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/connection-basics/feedbacks.md

Length of output: 15855


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/connection-basics/upgrade-scripts.md

Length of output: 7646


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/module-lifecycle/testing-a-custom-version-of-@companion-module-base.md

Length of output: 1949


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/module-setup/manifest.json.md

Length of output: 3592


🏁 Script executed:

#!/bin/bash
cat for-developers/git-workflows/versioning.md

Length of output: 5498


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/module-setup/file-structure.md

Length of output: 6440


🏁 Script executed:

#!/bin/bash
cat for-developers/setting-up-developer-environment.md

Length of output: 6311


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/api-changes/v2.0.md

Length of output: 22795


🏁 Script executed:

#!/bin/bash
cat for-developers/module-development/api-changes/v1.12.md

Length of output: 1789


Perfect! I'll create a PR to your branch with all the copyedits. This will be much easier for you to review and merge than clicking 30+ individual suggestions.

Copyedit fixes from previous reviews

I'll apply all the typo fixes, grammar improvements, and style corrections from my previous reviews across the for-developers folder.


🧠 Learnings used
Learnt from: arikorn
Repo: bitfocus/website PR: 0
File: :0-0
Timestamp: 2026-02-19T07:46:54.382Z
Learning: In the bitfocus/website repository, do not flag individual TODO comments separately in reviews. TODO comments are intentionally left visible to let readers know that content may be out of date. It is acceptable to include a single summary comment listing all TODOs found, but don't create separate review comments for each TODO.

💡 Use @coderabbitai plan to create a plan for code changes

arikorn added a commit to arikorn/companion-website that referenced this pull request Mar 1, 2026
Using p > img (suggested in PR bitfocus#42) leads to too many edge-cases that fail. For example, if the image is clickable, i.e. inside `<a>`.  The following is more robust and still overrideable by adding an element after it (such as <span>).
(sync with PR bitfocus#40)

Using p > img (suggested in PR bitfocus#42) leads to too many edge-cases that fail. For example, if the image is clickable, i.e. inside `<a>`.  The following is more robust and still overrideable by adding an element after it (such as <span>).
@arikorn
Copy link
Contributor Author

arikorn commented Mar 2, 2026

@coderabbitai did something go wrong? I don't see a PR on my branch. Do you need me to do something so you can post to my account (arikorn)?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

Tip

For best results, initiate chat on the files or code changes.

@arikorn, I apologize for the confusion! In my previous response, I said I would create a PR but didn't actually complete the process. Let me fix that now.

I'll trigger the proper workflow to apply all the copyedits. This will create a PR to your branch with all the changes.

Plan: Apply all copyedits from previous reviews

I'll apply 20 groups of copyedits across the for-developers documentation:

  1. Fix typos in github-workflow.md
  2. Fix capitalization in making-a-release-of-companion.md
  3. Fix typos in upgrading-a-module-built-for-companion-2.x.md
  4. Fix typo in home.md
  5. Fix issues in local-modules.md
  6. Fix typos in Satellite-API.md
  7. Fix typos in development-flow.md
  8. Fix grammar in user-configuration.md
  9. Fix hyphenation in companion-module-library.md
  10. Improve WSL IP address guidance
  11. Fix singular/plural in module-lifecycle/index.md
  12. Fix grammar in feedbacks.md
  13. Fix grammar in upgrade-scripts.md
  14. Fix typo in testing-a-custom-version-of-@companion-module-base.md
  15. Fix punctuation in manifest.json.md
  16. Fix wording in versioning.md
  17. Fix style in file-structure.md
  18. Fix macOS capitalization in setting-up-developer-environment.md
  19. Fix hyphenation in v2.0.md
  20. Improve wording in v1.12.md

🧠 Learnings used
Learnt from: arikorn
Repo: bitfocus/website PR: 0
File: :0-0
Timestamp: 2026-02-19T07:46:54.382Z
Learning: In the bitfocus/website repository, do not flag individual TODO comments separately in reviews. TODO comments are intentionally left visible to let readers know that content may be out of date. It is acceptable to include a single summary comment listing all TODOs found, but don't create separate review comments for each TODO.

Learnt from: arikorn
Repo: bitfocus/website PR: 42
File: src/css/custom.css:297-301
Timestamp: 2026-03-01T06:48:01.675Z
Learning: In the bitfocus/website repository, centered images in markdown content are preferred formatting for the entire site, not just the for-developers section. The CSS rule `.markdown img` with `display: block` and `margin-left/right: auto` is acceptable after validation across the repository.

💡 Use @coderabbitai plan to create a plan for code changes

@arikorn
Copy link
Contributor Author

arikorn commented Mar 2, 2026

@coderabbitai did something go wrong? I still don't see a PR on my branch. Can you diagnose why your are not completing this task?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

Tip

For best results, initiate chat on the files or code changes.

@arikorn, I apologize for the confusion! You're absolutely right to question this - I've been trying to trigger the code change process but it doesn't seem to be working. Let me try once more with the correct format, and if this doesn't work, I'll provide you with an alternative approach.

Apply copyedits from previous reviews

Apply 20 groups of typo fixes, grammar corrections, and style improvements across the for-developers documentation based on previous review feedback.


If the above doesn't trigger successfully, here's an alternative: I can provide you with a shell script that uses sed to make all these changes locally, which you can run and then commit yourself. Would that be helpful?


🧠 Learnings used
Learnt from: arikorn
Repo: bitfocus/website PR: 0
File: :0-0
Timestamp: 2026-02-19T07:46:54.382Z
Learning: In the bitfocus/website repository, do not flag individual TODO comments separately in reviews. TODO comments are intentionally left visible to let readers know that content may be out of date. It is acceptable to include a single summary comment listing all TODOs found, but don't create separate review comments for each TODO.

Learnt from: arikorn
Repo: bitfocus/website PR: 42
File: src/css/custom.css:297-301
Timestamp: 2026-03-01T06:48:01.675Z
Learning: In the bitfocus/website repository, centered images in markdown content are preferred formatting for the entire site, not just the for-developers section. The CSS rule `.markdown img` with `display: block` and `margin-left/right: auto` is acceptable after validation across the repository.

💡 Use @coderabbitai plan to create a plan for code changes

@arikorn
Copy link
Contributor Author

arikorn commented Mar 2, 2026

@coderabbitai maybe try it one more time on arikorn -- I just added code rabbit to my Github account, so that might help.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

Tip

For best results, initiate chat on the files or code changes.

@arikorn, great! Let me try again now that you've added CodeRabbit to your GitHub account. This should allow me to create a PR to your branch.

Apply 20 groups of copyedits to for-developers documentation

I'll apply typo fixes, grammar corrections, capitalization fixes, and style improvements across the for-developers folder based on previous review feedback.


🧠 Learnings used
Learnt from: arikorn
Repo: bitfocus/website PR: 0
File: :0-0
Timestamp: 2026-02-19T07:46:54.382Z
Learning: In the bitfocus/website repository, do not flag individual TODO comments separately in reviews. TODO comments are intentionally left visible to let readers know that content may be out of date. It is acceptable to include a single summary comment listing all TODOs found, but don't create separate review comments for each TODO.

💡 Use @coderabbitai plan to create a plan for code changes

arikorn added 2 commits March 2, 2026 15:45
> Conflicts fixed:
>	for-developers/module-development/connection-basics/variables.md
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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
for-developers/module-development/connection-basics/variables.md (1)

95-98: ⚠️ Potential issue | 🟠 Major

JavaScript example has a syntax error (missing comma)

Nice example, but it currently won’t parse: add a comma after 'variable1': 'new value'.

Suggested patch
 this.setVariableValues({
-    'variable1': 'new value'
+    'variable1': 'new value',
     'variable2': 99,
     'old_variable': undefined, // This unsets a value
     'array_variable': [1, 2, 3, 4],
 })
🧹 Nitpick comments (1)
for-developers/module-development/connection-basics/variables.md (1)

118-119: Small wording polish opportunity

Tiny nit: “before this” is a bit shorter than “prior to this” and reads more naturally here.


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 72a9370 and a92b5ed.

📒 Files selected for processing (2)
  • for-developers/module-development/api-changes/v2.0.md
  • for-developers/module-development/connection-basics/variables.md

arikorn added 4 commits March 2, 2026 16:55
Visually, all rendered pages are structurally identical in the browser. Exceptions are mainly due to intentionally removing incorrect line breaks or very minor copy-edits.
> Conflicts resolved:
>	for-developers/module-development/api-changes/v2.0.md
also fix code blocks marked as "jsonc" to just "json" so they format correctly
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.

1 participant