Skip to content

Conversation

@moreal
Copy link
Contributor

@moreal moreal commented Jan 26, 2026

Summary

Fix various JSDoc typos and incorrect references across multiple packages.

Related issue

  • N/A (documentation/typo fixes discovered during code review)

Changes

  • Fix RouteError references to RouterError in JSDoc comments and internal function names in packages/fedify/src/federation/context.ts, packages/fedify/src/federation/federation.ts, packages/fedify/src/testing/context.ts, and packages/testing/src/context.ts
  • Fix JSDoc @param name mismatch from locale to language in packages/vocab-runtime/src/langstr.ts#LanguageString.constructor
  • Fix JSDoc description of Context.sendActivity from "outboxes" to "inboxes" in packages/fedify/src/federation/context.ts#Context.sendActivity
  • Fix JSDoc return type reference from SchemaFile to TypeSchema in packages/vocab-tools/src/schema.ts#loadSchemaFiles
  • Fix JSDoc reference from options.ignorePreloadedContexts to options.skipPreloadedContexts in packages/vocab-runtime/src/docloader.ts#getDocumentLoader
  • Fix {@inheritDoc} reference from KvStore.set to KvStore.get in packages/denokv/src/mod.ts#DenoKvStore.get
  • Fix JSDoc example in convertHandleToUrl() to show correct acct: URI format in packages/cli/src/webfinger/lib.ts#convertHandleToUrl
  • Remove orphan @ symbol from JSDoc in packages/webfinger/src/lookup.ts#LookupWebFingerOptions.signal

Benefits

  • Improves accuracy of generated API documentation
  • Prevents confusion for developers reading JSDoc comments in IDEs
  • Ensures consistency between actual code behavior and documentation

Checklist

  • Did you add a changelog entry to the CHANGES.md?
    (N/A - documentation and internal testing functions-only changes)
  • Did you write some relevant docs about this change (if it's a new feature)?
    (N/A - documentation and internal testing functions-only changes)
  • Did you write a regression test to reproduce the bug (if it's a bug fix)?
    (N/A - documentation and internal testing functions-only changes)
  • Did you write some tests for this change (if it's a new feature)?
    (N/A - documentation and internal testing functions-only changes)
  • Did you run mise test on your machine?

Additional notes

This PR contains documentation and testing internal-only changes (JSDoc comments) with no runtime behavior changes.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @moreal, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the accuracy and consistency of JSDoc comments and internal documentation across various packages. The changes primarily involve correcting typos, updating references to types and parameters, and refining descriptions to ensure that the generated API documentation precisely reflects the codebase. This improves developer understanding and reduces potential confusion when interacting with the library's interfaces.

Highlights

  • JSDoc Reference Corrections: Multiple JSDoc references have been updated for accuracy, including changing RouteError to RouterError across several files, correcting KvStore.set to KvStore.get in DenoKvStore.get's {@inheritDoc} tag, and updating SchemaFile to TypeSchema in loadSchemaFiles's return type.
  • JSDoc Parameter and Description Fixes: Corrected JSDoc @param name mismatch from locale to language in LanguageString.constructor, updated the description of Context.sendActivity from 'outboxes' to 'inboxes', and fixed an invalid JSDoc tag @options to @param options in generateCloner.
  • JSDoc Example and Option Name Updates: The JSDoc example for convertHandleToUrl now correctly shows the acct: URI format, and a reference to options.ignorePreloadedContexts was updated to options.skipPreloadedContexts in getDocumentLoader.
  • Minor JSDoc Cleanup: An orphan @ symbol was removed from JSDoc in LookupWebFingerOptions.signal.
  • Internal Function Name Refactoring: The internal helper function throwRouteError was renamed to throwRouterError in testing contexts to align with the RouterError class name.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@issues-auto-labeler issues-auto-labeler bot added component/cli CLI tools related component/federation Federation object related component/testing Testing utilities (@fedify/testing) labels Jan 26, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively addresses several JSDoc typos and incorrect references across various packages. The changes improve the accuracy and clarity of the API documentation, which is crucial for developer understanding and consistency with the actual code behavior. All identified issues are minor documentation fixes, and the changes appear correct.

/**
* Converts a handle in the format `@username@domain` to a URL.
* The resulting URL will be in the format `https://domain/@username`.
* The resulting URL will be in the format `acct:username@domain`.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The JSDoc description for convertHandleToUrl was updated to correctly reflect the acct:username@domain format. This improves the accuracy of the documentation.

* ```ts
* const url = convertHandleToUrl("@username@domain.com");
* console.log(url.toString()); // "https://domain.com/@username"
* console.log(url.toString()); // "acct:username@domain.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The example in the JSDoc for convertHandleToUrl was updated to show the correct acct:username@domain.com URI format. This ensures the example is consistent with the function's behavior.


/**
* {@inheritDoc KvStore.set}
* {@inheritDoc KvStore.get}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The {@inheritDoc} reference for the get method was correctly updated from KvStore.set to KvStore.get. This ensures the documentation inherits from the correct method.

* @param values The values to pass to the object dispatcher.
* @returns The object's URI.
* @throws {RouteError} If no object dispatcher is available for the class.
* @throws {RouterError} If no object dispatcher is available for the class.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The JSDoc reference for RouteError was corrected to RouterError. This aligns the documentation with the actual error class name.


/**
* Sends an activity to the outboxes of the sender's followers.
* Sends an activity to the inboxes of the sender's followers.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The JSDoc description for Context.sendActivity was updated from "outboxes" to "inboxes". This clarifies the destination of the activity.

*
* The created loader preloads the below frequently used contexts by default
* (unless `options.ignorePreloadedContexts` is set to `true`):
* (unless `options.skipPreloadedContexts` is set to `true`):
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The JSDoc reference for options.ignorePreloadedContexts was corrected to options.skipPreloadedContexts. This aligns the documentation with the actual option name.

* @param value A string value written in the given language.
* @param locale The language of the string. If a string is given, it will
* be parsed as a `Intl.Locale` object.
* @param language The language of the string. If a string is given, it will
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The @param name in the JSDoc was corrected from locale to language to match the actual parameter name in the constructor signature. This improves documentation accuracy.

* Loads all schema files in the directory.
* @param dir The path of the directory to load schema files from.
* @returns A map from the qualified URI of a type to its {@link SchemaFile}.
* @returns A map from the qualified URI of a type to its {@link TypeSchema}.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The JSDoc return type reference was corrected from SchemaFile to TypeSchema. This ensures the documentation accurately reflects the returned type.

* AbortSignal for cancelling the request.
* @since 1.8.0
* @
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

An orphan @ symbol was removed from the JSDoc comment. This is a minor cleanup that improves readability.

@moreal moreal marked this pull request as draft January 26, 2026 12:21
@moreal moreal marked this pull request as ready for review January 26, 2026 12:25
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/testing/src/context.ts 91.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
packages/cli/src/webfinger/lib.ts 86.66% <ø> (ø)
packages/denokv/src/mod.ts 70.62% <ø> (ø)
packages/fedify/src/testing/context.ts 75.75% <100.00%> (ø)
packages/vocab-runtime/src/docloader.ts 86.89% <ø> (ø)
packages/vocab-runtime/src/langstr.ts 72.72% <ø> (ø)
packages/vocab-tools/src/schema.ts 62.50% <ø> (ø)
packages/webfinger/src/lookup.ts 88.46% <ø> (ø)
packages/testing/src/context.ts 53.28% <91.66%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@moreal moreal marked this pull request as draft January 26, 2026 12:51
@moreal
Copy link
Contributor Author

moreal commented Jan 26, 2026

I'll mark as ready-for-review when passing CI. Now, it fails.

@issues-auto-labeler issues-auto-labeler bot added the component/build Build system and packaging label Jan 26, 2026
@moreal moreal force-pushed the docs-typo-more branch 4 times, most recently from 9788bf9 to 1a6a543 Compare January 27, 2026 03:30
moreal and others added 8 commits January 27, 2026 14:01
The JSDoc for the sendActivity overload that sends to followers
incorrectly stated it sends activities to "outboxes" of followers.
In ActivityPub, activities are always delivered to recipients' inboxes,
not outboxes. Outboxes are where an actor's own activities are published
for others to read, while inboxes receive activities from other actors.

This typo was introduced in commit fabad8f ("Followers collection
synchronization") on April 25, 2024.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The JSDoc comment for getDocumentLoader() incorrectly mentioned
`options.ignorePreloadedContexts` when the actual option name has
always been `skipPreloadedContexts`. This typo was introduced in
commit cfe509f (2024-11-04) when the getDocumentLoader function
and GetDocumentLoaderOptions interface were added.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The JSDoc for the LanguageString constructor documented the second
parameter as `@param locale`, but the actual parameter is named
`language`. This mismatch was introduced when migrating from
LanguageTag to Intl.Locale, where the property was renamed but the
constructor parameter name remained `language`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The JSDoc `@returns` tag incorrectly referenced ``{@link SchemaFile}``, which
is a non-existent type. The actual return type is `Record<string, TypeSchema>`,
so the correct reference should be ``{@link TypeSchema}``.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The get() method's JSDoc incorrectly referenced KvStore.set instead of
KvStore.get. This was a copy-paste error that has been present since the
denokv adapter was created.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The JSDoc incorrectly stated that the resulting URL would be in the format
`https://domain/@username`, but the implementation uses `toAcctUrl()` which
produces `acct:username@domain` format per RFC 7565.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The signal property's JSDoc comment contained an orphan '@' symbol on its
own line without a valid tag name. This is invalid JSDoc syntax.

This malformed tag was introduced in commit 2597d81 (2025-08-03) when
adding `@since` 1.8.0 annotation for AbortSignal.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- JSDoc comments incorrectly referenced RouteError but the actual error
  class is RouterError
- Renamed throwRouteError() helper functions to throwRouterError() to
  match the error class they throw

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@moreal moreal marked this pull request as ready for review January 27, 2026 05:34
Copy link
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

Thanks!

@dahlia dahlia merged commit 4b3366b into fedify-dev:main Jan 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/build Build system and packaging component/cli CLI tools related component/federation Federation object related component/testing Testing utilities (@fedify/testing)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants