Skip to content

docs: add @fileoverview headers to all source files#17

Merged
GhostTypes merged 1 commit into
mainfrom
docs/add-fileoverview-headers
Feb 8, 2026
Merged

docs: add @fileoverview headers to all source files#17
GhostTypes merged 1 commit into
mainfrom
docs/add-fileoverview-headers

Conversation

@GhostTypes

Copy link
Copy Markdown
Owner

Summary

  • Add concise @fileoverview documentation headers to all 45 source files that were missing them
  • Headers follow a 1-2 sentence format focusing on the main purpose of each file
  • Replace old code-documenter agent with new fileoverview-docs-writer agent

Changes

  • Main client files: FiveMClient, index, firmware-test
  • API control modules: Control, Files, Info, JobControl, TempControl (src + tests)
  • API support modules: PrinterDiscovery, Filament, network utils, server endpoints
  • Model files: MachineInfo, ff-models
  • TCP client files: FlashForgeClient, FlashForgeTcpClient, GCodes
  • TCP replay parsers: EndstopStatus, LocationInfo, PrintStatus, PrinterInfo, TempInfo, ThumbnailInfo

Verification

All files now pass pnpm docs:check with proper @fileoverview documentation.

🤖 Generated with Claude Code

Add concise @fileoverview documentation headers to all 45 source files
that were missing them. Headers follow a 1-2 sentence format focusing
on the main purpose of each file.

Files documented include:
- Main client files (FiveMClient, index, firmware-test)
- API control modules (Control, Files, Info, JobControl, TempControl)
- API support modules (PrinterDiscovery, Filament, network, server)
- Model files (MachineInfo, ff-models)
- TCP client files (FlashForgeClient, FlashForgeTcpClient, GCodes)
- TCP replay parsers (EndstopStatus, LocationInfo, PrintStatus, etc.)

Also adds fileoverview-docs-writer agent for automated documentation.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @GhostTypes, 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 significantly enhances the project's documentation by introducing standardized @fileoverview headers to all source files. The primary goal is to improve code readability and maintainability by providing immediate context for each file's purpose. This change also includes updating the internal tooling to support this new documentation standard, ensuring that future documentation efforts are consistent and efficient.

Highlights

  • Comprehensive Documentation Headers: Added concise @fileoverview documentation headers to all 45 source files that were previously missing them, ensuring consistent and clear file-level documentation across the codebase.
  • Standardized Header Format: The newly added headers adhere to a 1-2 sentence format, specifically focusing on the main purpose and functionality of each file for quick comprehension.
  • Agent Replacement: The old code-documenter agent has been replaced with a new, more specialized fileoverview-docs-writer agent, designed to streamline the process of adding and maintaining @fileoverview documentation.
  • Documentation Check Script: Introduced a new pnpm docs:check script, which utilizes a Go program (scripts/check-fileoverview.go) to authoritatively identify files missing @fileoverview headers, enhancing the documentation workflow.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .claude/agents/code-documenter.md
    • Removed the code-documenter agent, as it has been superseded by a more specialized agent.
  • .claude/agents/fileoverview-docs-writer.md
    • Added a new fileoverview-docs-writer agent, specifically designed for adding and updating @fileoverview documentation headers in TypeScript/JavaScript files. This agent emphasizes using pnpm docs:check for authoritative file identification.
  • .claude/settings.local.json
    • Updated the allowed bash commands to include Bash(go run:*), enabling the execution of the new Go-based documentation check script.
  • package.json
    • Added a new docs:check script, which executes go run scripts/check-fileoverview.go to identify files missing @fileoverview headers.
  • src/FiveMClient.ts
    • Added @fileoverview header: 'Main client for controlling FlashForge 5M/5M Pro/AD5X printers via dual HTTP/TCP protocols.'
  • src/api/PrinterDiscovery.ts
    • Added @fileoverview header: 'UDP broadcast discovery for FlashForge 3D printers on local network...'
  • src/api/controls/Control.test.ts
    • Added @fileoverview header: 'Unit tests for Control module...'
  • src/api/controls/Control.ts
    • Added @fileoverview header: 'HTTP API control module for FlashForge 5M printers...'
  • src/api/controls/Files.test.ts
    • Added @fileoverview header: 'Unit tests for Files module...'
  • src/api/controls/Files.ts
    • Added @fileoverview header: 'HTTP API file management module for FlashForge 5M printers...'
  • src/api/controls/Info.test.ts
    • Added @fileoverview header: 'Unit tests for Info module...'
  • src/api/controls/Info.ts
    • Added @fileoverview header: 'HTTP API information retrieval module for FlashForge 5M printers...'
  • src/api/controls/JobControl.test.ts
    • Added @fileoverview header: 'Unit tests for JobControl module...'
  • src/api/controls/JobControl.ts
    • Added @fileoverview header: 'HTTP API job management module for FlashForge 5M printers...'
  • src/api/controls/TempControl.test.ts
    • Added @fileoverview header: 'Unit tests for TempControl module...'
  • src/api/controls/TempControl.ts
    • Added @fileoverview header: 'Temperature control module for FlashForge 5M printers...'
  • src/api/filament/Filament.test.ts
    • Added @fileoverview header: 'Tests for Filament class...'
  • src/api/filament/Filament.ts
    • Added @fileoverview header: 'Filament type model for 3D printing operations...'
  • src/api/misc/ScientificNotationFloatConverter.test.ts
    • Added @fileoverview header: 'Tests for scientific notation number formatting...'
  • src/api/misc/ScientificNotationFloatConverter.ts
    • Added @fileoverview header: 'Number formatting utility for scientific notation...'
  • src/api/misc/Temperature.test.ts
    • Added @fileoverview header: 'Tests for Temperature class...'
  • src/api/misc/Temperature.ts
    • Added @fileoverview header: 'Temperature value wrapper class...'
  • src/api/network/FNetCode.ts
    • Added @fileoverview header: 'Network response code enumeration...'
  • src/api/network/NetworkUtils.test.ts
    • Added @fileoverview header: 'Tests for NetworkUtils class...'
  • src/api/network/NetworkUtils.ts
    • Added @fileoverview header: 'Network response validation utilities...'
  • src/api/server/Commands.ts
    • Added @fileoverview header: 'Command string constants for printer API requests...'
  • src/api/server/Endpoints.ts
    • Added @fileoverview header: 'HTTP API endpoint paths for FlashForge 5M printers...'
  • src/firmware-test.ts
    • Added @fileoverview header: 'Standalone test script for verifying printer firmware version via HTTP and TCP APIs.'
  • src/index.ts
    • Added @fileoverview header: 'Public API entry point exporting all library modules for FlashForge printer control.'
  • src/models/MachineInfo.test.ts
    • Added @fileoverview header: 'Unit tests for MachineInfo transformation logic.'
  • src/models/MachineInfo.ts
    • Added @fileoverview header: 'Transforms raw printer detail data from the API into structured machine info.'
  • src/models/ff-models.ts
    • Added @fileoverview header: 'TypeScript interfaces and enums for FlashForge printer data models and API responses.'
  • src/tcpapi/FlashForgeClient.ts
    • Added @fileoverview header: 'High-level TCP client for FlashForge 3D printers, providing printer control workflows...' and removed a verbose JSDoc block.
  • src/tcpapi/FlashForgeTcpClient.test.ts
    • Added @fileoverview header: 'Tests for FlashForgeTcpClient file list parsing logic...'
  • src/tcpapi/FlashForgeTcpClient.ts
    • Added @fileoverview header: 'Low-level TCP socket client for FlashForge printers, managing connections...' and removed a verbose JSDoc block.
  • src/tcpapi/client/GCodeController.ts
    • Added @fileoverview header: 'Abstraction layer for sending specific G-code commands to FlashForge printers...' and removed a verbose JSDoc block.
  • src/tcpapi/client/GCodes.ts
    • Added @fileoverview header: 'G-code and M-code command constants for FlashForge TCP communication...' and removed a verbose JSDoc block.
  • src/tcpapi/replays/EndstopStatus.test.ts
    • Added @fileoverview header: 'Tests for EndstopStatus parser including M119 response parsing and status checking methods.'
  • src/tcpapi/replays/EndstopStatus.ts
    • Added @fileoverview header: 'Parses M119 command responses to extract endstop states, machine status, movement mode, and LED state.'
  • src/tcpapi/replays/LocationInfo.test.ts
    • Added @fileoverview header: 'Tests for LocationInfo parser including M114 response parsing and coordinate extraction.'
  • src/tcpapi/replays/LocationInfo.ts
    • Added @fileoverview header: 'Parses M114 command responses to extract current print head X, Y, Z coordinates.'
  • src/tcpapi/replays/PrintStatus.test.ts
    • Added @fileoverview header: 'Tests for PrintStatus parser including M27 response parsing and progress calculation.'
  • src/tcpapi/replays/PrintStatus.ts
    • Added @fileoverview header: 'Parses M27 command responses to extract print job progress including SD card bytes and layer counts.'
  • src/tcpapi/replays/PrinterInfo.test.ts
    • Added @fileoverview header: 'Tests for PrinterInfo parser including M115 response parsing and printer metadata extraction.'
  • src/tcpapi/replays/PrinterInfo.ts
    • Added @fileoverview header: 'Parses M115 command responses to extract printer information including model, firmware, serial number, and dimensions.'
  • src/tcpapi/replays/TempInfo.test.ts
    • Added @fileoverview header: 'Tests for TempInfo parser including M105 response parsing and temperature data extraction.'
  • src/tcpapi/replays/TempInfo.ts
    • Added @fileoverview header: 'Parses M105 command responses to extract extruder and bed temperatures with current and target values.'
  • src/tcpapi/replays/ThumbnailInfo.test.ts
    • Added @fileoverview header: 'Tests for ThumbnailInfo parser including M662 response parsing and PNG image extraction.'
  • src/tcpapi/replays/ThumbnailInfo.ts
    • Added @fileoverview header: 'Parses M662 command responses to extract PNG thumbnail images from printer files.'
Activity
  • No human activity (comments, reviews, or progress updates) has been recorded on this pull request yet.
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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This is an excellent pull request that systematically adds @fileoverview documentation headers to all source files, significantly improving code readability and maintainability. The new documentation is clear, concise, and accurately describes the purpose of each file. The introduction of the fileoverview-docs-writer agent and the docs:check script establishes a robust workflow for maintaining documentation standards across the project. The changes are well-implemented and align perfectly with the goal of creating a more self-documenting codebase.

@GhostTypes GhostTypes merged commit 5c0e727 into main Feb 8, 2026
1 check passed
@GhostTypes GhostTypes deleted the docs/add-fileoverview-headers branch February 8, 2026 00:30
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