Skip to content

Doxygen second pass: coverage, improvements, fixes, etc.#142

Open
alan-george-lk wants to merge 28 commits into
mainfrom
feature/more_docs
Open

Doxygen second pass: coverage, improvements, fixes, etc.#142
alan-george-lk wants to merge 28 commits into
mainfrom
feature/more_docs

Conversation

@alan-george-lk
Copy link
Copy Markdown
Collaborator

@alan-george-lk alan-george-lk commented May 27, 2026

Added:

  • scripts/generate-docs.sh: like the clang-* tools before, helper script for generating Doxygen locally and in CI
  • generate-docs.yml workflow stage that validates documentation generates and has no errors, which will catch broken refs, incomplete docs, etc.
  • Added missing doc comments to cover all classes

Changes:

  • Moved Doxygen files from docs/ to docs/doxygen. This was a strategic decision such that docs/ could also hold plain .md files for developer/design reference, such as the Rust SDK/common repo convention

(rendering changes below)

  • Cleaned up side bar (LiveKit C++ SDK was duplicated in the tree)
  • Removed README.md embedding into the SDK. The GitHub light/dark mode logo rendered wrong and would have been cumbersome to edit programmatically during docs build to get right
  • Fixed broken example links and added additional examples

Fixes:

  • Existing class comments now parse right, such that all classes in the Class List view have entries
  • Styling issues, broken links, favicon locally

Before

Tree (redundant and no version):

Screenshot 2026-05-27 at 10 25 14 PM

Examples (broken links):

Screenshot 2026-05-27 at 10 25 31 PM

After

Tree (less redundant and has version)

Screenshot 2026-05-27 at 10 31 41 PM

Examples (expanded and fixed links):

Screenshot 2026-05-27 at 10 26 33 PM

Comment thread .github/workflows/publish-docs.yml Fixed
Comment thread .github/workflows/validate-docs.yml Fixed
Copy link
Copy Markdown
Collaborator

@stephen-derosa stephen-derosa left a comment

Choose a reason for hiding this comment

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

just reviewed agents/code changes. Still need to go through the GHA and docs/ work but lookig great!

Comment thread scripts/generate-docs.sh
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe just a me thing, but i originally thought this was generating docs in the code, consider renaming to build-doxygen

Copy link
Copy Markdown
Collaborator Author

@alan-george-lk alan-george-lk May 28, 2026

Choose a reason for hiding this comment

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

I went with generate-docs for both this and the Workflow stage because the existing one was called publish-docs. I'm open to changing it to build-docs but was being overly pedantic about having the workflow be adjacently indexed alphabetically to the publish-docs stage. And it's not really a build, it's a codegen

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Example output from Doxygen itself in this stage:

Generating style sheet...
Generating search indices...
Generating example documentation...
Generating file sources...
Generating code for file include/livekit/audio_frame.h...
Generating code for file include/livekit/audio_processing_module.h...
Generating code for file include/livekit/audio_source.h...
Generating code for file include/livekit/audio_stream.h...

/// stream->close(); // optional, called automatically in destructor
class LIVEKIT_API VideoStream {
public:
/// @brief Options for creating a decoded video frame stream.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

decoded or encoded?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is the outer class doc:

/// Represents a pull-based stream of decoded video frames coming from
/// a remote (or local) LiveKit track. Similar to AudioStream, but for video.

Which existed before I started mucking around. I'm not sure 100%

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can omit @breif since you have JAVADOC_AUTOBRIEF enabled in the config.

class OwnedTrackPublication;
}

/// @brief Publication metadata for a remotely published media track.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this actually metadata? looks like OwnedTrackPublication also has a an OwnedTrackPublication object

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, fixed

}

/// @brief Publication metadata for a locally published media track.
class LIVEKIT_API LocalTrackPublication : public TrackPublication {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same metadata comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Also good catch, fixed

@alan-george-lk alan-george-lk marked this pull request as ready for review May 28, 2026 15:27
Copy link
Copy Markdown
Collaborator

@stephen-derosa stephen-derosa left a comment

Choose a reason for hiding this comment

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

few small commands but lgtm!

Comment thread .github/workflows/generate-docs.yml Outdated
paths:
- include/**
- src/**
- examples/**
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

idt this dir exists?

upload_artifact: true
# Suffix with run_id so concurrent publish runs cannot collide on the
# artifact namespace within the same repository.
artifact_name: livekit-cpp-docs-${{ github.run_id }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

run_id==commit hash? if not we should consider using commit hash

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nope, this is the integer incrementing count (see actions tab). Just needs to be unique such that if for some reason two releases are pushing docs (say we back-patched an old tag in addition to a new one simultaneously), they wouldn't conflict.

This is just the temporary artifact name between the generate and publish stages in the actions space, not in S3 or anywhere permanent. Open to SHA if you prefer

LATEST_PREFIX="s3://livekit-docs/client-sdk-cpp"

# Upload immutable versioned docs, then refresh rolling latest.
aws s3 cp "$DOCS_DIR"/ "$VERSIONED_PREFIX" --recursive
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i always hated wrestling aws creds, glad we have it for this!

Comment thread docs/doxygen/index.md
@@ -1,9 +1,7 @@
# LiveKit C++ Client SDK
# Overview
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i think other SDKs have LiveKit <lang> Client SDK, no?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i am thinking this is in location of the SS atttatched, if not no worries:

Image

Copy link
Copy Markdown
Collaborator Author

@alan-george-lk alan-george-lk May 28, 2026

Choose a reason for hiding this comment

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

I'll reference this JS one and match phrasing -- the reason I removed this is previously we had:

  • LiveKit C++ SDK
    • LiveKit C++ Client SDK
      • <child items>

On the side navigation tree (see above screenshots in PR body) which were ugly. That's what this change did, made the second one just Overview

@stephen-derosa
Copy link
Copy Markdown
Collaborator

image any way to get rid of the `9417...` trailing `v0.4.0` ?

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.

4 participants