Skip to content

Conversation

@malcontent5
Copy link
Collaborator

@malcontent5 malcontent5 commented Jan 3, 2026

Summary by Sourcery

Add documentation template and navigation entry for an example module.

Documentation:

  • Add a new example module documentation page describing structure and guidelines for documenting module command groups.
  • Register the example module documentation page in the docs navigation under Modules.

@malcontent5 malcontent5 self-assigned this Jan 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 3, 2026

Reviewer's Guide

Adds a new example module documentation page and wires it into the docs navigation under Modules.

File-Level Changes

Change Details Files
Wire new example module documentation into the Modules section of the docs navigation.
  • Insert new entry for the example module docs page in the Modules subsection of the nav configuration
zensical.toml
Create an example module documentation template for user modules.
  • Add front matter metadata for the example module docs page including title and tags
  • Provide introductory section outlining purpose of the module docs
  • Add a command group template section describing how to document commands, permissions, and flags, including an example shell command invocation block
docs/content/user/modules/example_module_docs.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link

coderabbitai bot commented Jan 3, 2026

Walkthrough

This PR restructures the documentation site with a new nested navigation hierarchy, introduces comprehensive documentation templates for modules and commands, completely rewrites multiple feature documentation pages with a standardized structure (Mechanics, Automation, Triggers, etc.), and adds extensive new documentation for modules and commands. Timezone-aware DateTime fields are removed from database models to use naive datetime handling.

Changes

Cohort / File(s) Summary
Documentation Configuration & Tooling
zensical.toml, .markdownlint.yaml, .vscode/settings.json, .cursor/rules/docs/style.mdc, docs/content/admin/config/roles.md
Navigation restructured with new nested "Modules & Commands" organization; MD024 rule scope narrowed to siblings; markdown validation disabled in VSCode; added formatting guidance for nested lists; updated role command examples to use named parameters
Documentation Templates & Reference Structure
docs/content/reference/docs/index.md, docs/content/reference/docs/templates/index.md, docs/content/reference/docs/templates/{module,command,command-group,feature}-template.md
Five new comprehensive documentation templates added (Module, Command, Command Group, Feature) with YAML frontmatter, placeholder guidance, and standardized section structures; templates index provides usage guidelines and workflow documentation
Feature Documentation Rewrites
docs/content/user/features/{bookmarks,gif-limiter,leveling,starboard,status-roles,temp-vc}.md
Major restructuring of six feature pages: replaced procedural instructions with event-driven Mechanics/Automation/Triggers sections; added standardized User Experience, Configuration, Permissions, and Troubleshooting blocks; consolidated content and added admin/config guide references
Module Documentation Structure
docs/content/user/modules/index.md, docs/content/user/features/index.md, docs/content/user/modules/{config,fun,info,levels,moderation,snippets,tools,utility}/index.md
Added module index pages and feature categorization; replaced flat navigation with organized "Available Modules" and "Available Features" sections; included command tables, common use cases, and permission configuration guidance for each module
Individual Module & Command Documentation
docs/content/user/modules/fun/{random,xkcd}.md, docs/content/user/modules/info/{avatar,info,membercount}.md, docs/content/user/modules/levels/{level,levels}.md, docs/content/user/modules/moderation/{ban,cases,clearafk,jail,kick,pollban,pollunban,purge,report,slowmode,snippetban,snippetunban,tempban,timeout,unban,unjail,untimeout,warn}.md, docs/content/user/modules/snippets/{createsnippet,deletesnippet,editsnippet,snippet,snippetinfo,snippets,togglesnippetlock}.md, docs/content/user/modules/tools/{tldr,wolfram}.md, docs/content/user/modules/utility/{afk,encode-decode,ping,poll,remindme,run,self-timeout,timezones,wiki}.md
50+ new command/feature documentation pages covering syntax, parameters, permissions, usage examples, response formats, error handling, and related commands; consistent structure across all module types
Process & Utility Documentation
docs/content/faq/index.md, .cursor/commands/documentation/docs-serve.md
Added FAQ sections (General and Support Questions) with self-hosting and support information; expanded docs-serve workflow from 4 steps to 15-step comprehensive validation and testing guide
Database Model Changes
src/tux/database/models/{base.py,models.py}
Removed timezone-aware DateTime(timezone=True) from TimestampMixin fields (created_at, updated_at) and multiple model fields (Guild.guild_joined_at, Case.case_expires_at, Reminder.reminder_expires_at, AFK.since/until, Levels.last_message, StarboardMessage.message_expires_at); changed to naive datetime with .replace(tzinfo=None) where applicable

Sequence Diagram(s)

No sequence diagrams generated: The changes are primarily documentation restructuring, new documentation additions, and a straightforward database field refactoring. While there are feature documentation rewrites, they document existing functionality without introducing new control flows or multi-component interactions requiring visualization.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~70 minutes

The PR encompasses 4000+ lines of changes across 80+ files with high volume and variety: 50+ new documentation pages following similar patterns (homogeneous), 6+ feature documentation rewrites with structural changes (heterogeneous), configuration and tooling updates, and minimal code changes. The repetitive nature of module documentation reduces per-file complexity, but the overall scope, consistency verification across templates and documentation structure, and diverse content types (features, modules, commands, configuration, code) demand thorough review.

Possibly related PRs

  • docs: agentic rules and commands #1101: Modifies the same .cursor/commands/documentation/docs-serve.md file and expands Cursor rules/commands documentation, indicating parallel documentation tooling improvements.
🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title '[DRAFT] docs' is vague and does not clearly convey the main changes; it uses a non-descriptive term 'docs' that fails to communicate the specific purpose of adding documentation templates and navigation entries. Revise the title to be more specific and descriptive, such as 'Add documentation templates and module navigation structure' or 'Expand docs with templates and reorganize module navigation'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description is partially related to the changeset, mentioning documentation templates and navigation entries, but significantly understates the scope; the PR makes extensive structural changes across navigation, adds numerous command documentation pages, and modifies database models—none of which are adequately reflected in the description.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/docs

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

📚 Documentation Preview

Type URL Version Message
Production https://tux.atl.dev - -
Preview https://6d1c5e71-tux-docs.allthingslinux.workers.dev 6d1c5e71-766c-4936-a015-6609ce78c43c Preview: tux@424d279f5dc57501ddb895af9b1430a5615252a4 on 1135/merge by kzndotsh (run 265)

@sentry
Copy link

sentry bot commented Jan 3, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 37.73%. Comparing base (c21568e) to head (81a5c2d).
⚠️ Report is 45 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/tux/database/models/base.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1135   +/-   ##
=======================================
  Coverage   37.73%   37.73%           
=======================================
  Files         201      201           
  Lines       13888    13888           
  Branches     1686     1686           
=======================================
  Hits         5241     5241           
  Misses       8647     8647           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@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: 3

🧹 Nitpick comments (2)
docs/content/user/modules/example_module_docs.md (1)

1-9: Consider a more descriptive title for user-facing documentation.

The title "example_module_docs" uses underscores and doesn't clearly indicate this is template documentation. Consider a title like "Module Documentation Template" or "Example Module" for better clarity.

🔎 Suggested improvement
 ---
-title: example_module_docs
+title: Module Documentation Template
 tags:
   - user-guide
   - features
   - example
 ---
 
-# example_module_docs
+# Module Documentation Template
zensical.toml (1)

31-41: Consider reordering the navigation entry.

The new example documentation is placed before index.md in the Modules navigation. Typically, index pages appear first in the navigation hierarchy for better organization and user experience. Consider moving this entry after the index, or if this placement is intentional for testing purposes in this draft PR, it may be worth adding a comment.

🔎 Suggested reordering
         { "Modules" = [
-            "user/modules/example_module_docs.md",
             "user/modules/index.md",
+            "user/modules/example_module_docs.md",
             "user/modules/fun.md",
             "user/modules/info.md",
             "user/modules/levels.md",
             "user/modules/moderation.md",
             "user/modules/snippets.md",
             "user/modules/tools.md",
             "user/modules/utility.md",
         ] },
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd1f20e and 3f4630e.

📒 Files selected for processing (2)
  • docs/content/user/modules/example_module_docs.md
  • zensical.toml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

Follow documentation standards as defined in docs/docs.mdc, docs/patterns.mdc, docs/principals.mdc, docs/structure.mdc, docs/style.mdc, and docs/syntax.mdc

Files:

  • docs/content/user/modules/example_module_docs.md
🪛 LanguageTool
docs/content/user/modules/example_module_docs.md

[grammar] ~20-~20: Ensure spelling is correct
Context: ...s in this case are when module contains multuiple related commands I.E ban & unban If a c...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~21-~21: Ensure spelling is correct
Context: ... have any commands then they can be "by themeselves" in the module docs Firstly give a ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~25-~25: Ensure spelling is correct
Context: ...nd has when using it and what each flag corosponds to sh command <flag1> <flag2>

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~25-~25: Ensure spelling is correct
Context: ...sing it and what each flag corosponds to sh command <flag1> <flag2>

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ 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: Run All Tests (3.13.8)

Comment on lines 11 to 13
## Introduction

Introduces the module and gives a brief overview of it's purpose and what it offers.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix grammatical error: use "its" instead of "it's".

"Its" is the possessive form; "it's" means "it is".

🔎 Proposed fix
 ## Introduction
 
-Introduces the module and gives a brief overview of it's purpose and what it offers.
+Introduces the module and gives a brief overview of its purpose and what it offers.
📝 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
## Introduction
Introduces the module and gives a brief overview of it's purpose and what it offers.
## Introduction
Introduces the module and gives a brief overview of its purpose and what it offers.
🤖 Prompt for AI Agents
In docs/content/user/modules/example_module_docs.md around lines 11 to 13, the
text uses the contraction "it's" where the possessive "its" is required; update
the sentence "Introduces the module and gives a brief overview of it's purpose
and what it offers." to use "its" (i.e., "its purpose") so the possessive form
is correct.

Comment on lines 15 to 21
<!-- Groups in this case are when module contains multuiple related commands I.E ban & unban
If a command dosen't have any commands then they can be "by themeselves" in the module docs -->

## Command Group (Template/Guideline)
>
>Groups in this case are when module contains multuiple related commands I.E ban & unban
If a command dosen't have any commands then they can be "by themeselves" in the module docs
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix multiple spelling errors and blockquote formatting.

This section contains several issues:

  1. Spelling errors: "multuiple" → "multiple", "dosen't" → "doesn't", "themeselves" → "themselves"
  2. Malformed blockquote: lines 20-21 are missing the > prefix
  3. Redundant content between HTML comment and blockquote
🔎 Proposed fix
-<!-- Groups in this case are when module contains multuiple related commands I.E ban & unban
-If a command dosen't have any commands then they can be "by themeselves" in the module docs -->
+<!-- Groups in this case are when module contains multiple related commands I.E ban & unban
+If a command doesn't have any commands then they can be "by themselves" in the module docs -->
 
 ## Command Group (Template/Guideline)
->
->Groups in this case are when module contains multuiple related commands I.E ban & unban
-If a command dosen't have any commands then they can be "by themeselves" in the module docs
+
+> Groups in this case are when module contains multiple related commands I.E ban & unban.
+> If a command doesn't have any commands then they can be "by themselves" in the module docs.
📝 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
<!-- Groups in this case are when module contains multuiple related commands I.E ban & unban
If a command dosen't have any commands then they can be "by themeselves" in the module docs -->
## Command Group (Template/Guideline)
>
>Groups in this case are when module contains multuiple related commands I.E ban & unban
If a command dosen't have any commands then they can be "by themeselves" in the module docs
<!-- Groups in this case are when module contains multiple related commands I.E ban & unban
If a command doesn't have any commands then they can be "by themselves" in the module docs -->
## Command Group (Template/Guideline)
> Groups in this case are when module contains multiple related commands I.E ban & unban.
> If a command doesn't have any commands then they can be "by themselves" in the module docs.
🧰 Tools
🪛 LanguageTool

[grammar] ~20-~20: Ensure spelling is correct
Context: ...s in this case are when module contains multuiple related commands I.E ban & unban If a c...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~21-~21: Ensure spelling is correct
Context: ... have any commands then they can be "by themeselves" in the module docs Firstly give a ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In docs/content/user/modules/example_module_docs.md around lines 15 to 21, fix
spelling and formatting: correct "multuiple" → "multiple", "dosen't" →
"doesn't", and "themeselves" → "themselves"; ensure the blockquote lines 20–21
have the leading ">" so the quoted guideline renders properly; and remove the
redundant duplicate text (either the HTML comment or the blockquote) so only one
clear guideline remains.

Comment on lines 23 to 25
**Firstly** give a brief overview of the command(s) what it does and what its ment to be used for. \
**Secondly** ==Specify any server permisions== needed for both the bot and the user to run. \
**Finally** specifiy ==all of the flags== the command has when using it and what each flag corosponds to
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Correct multiple spelling errors in the template guidelines.

Several typos need correction:

  • "ment" → "meant"
  • "permisions" → "permissions"
  • "specifiy" → "specify"
  • "corosponds" → "corresponds"
🔎 Proposed fix
-**Firstly** give a brief overview of the command(s) what it does and what its ment to be used for. \
-**Secondly** ==Specify any server permisions== needed for both the bot and the user to run. \
-**Finally** specifiy ==all of the flags== the command has when using it and what each flag corosponds to
+**Firstly** give a brief overview of the command(s) what it does and what its meant to be used for. \
+**Secondly** ==Specify any server permissions== needed for both the bot and the user to run. \
+**Finally** specify ==all of the flags== the command has when using it and what each flag corresponds to
📝 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
**Firstly** give a brief overview of the command(s) what it does and what its ment to be used for. \
**Secondly** ==Specify any server permisions== needed for both the bot and the user to run. \
**Finally** specifiy ==all of the flags== the command has when using it and what each flag corosponds to
**Firstly** give a brief overview of the command(s) what it does and what its meant to be used for. \
**Secondly** ==Specify any server permissions== needed for both the bot and the user to run. \
**Finally** specify ==all of the flags== the command has when using it and what each flag corresponds to
🧰 Tools
🪛 LanguageTool

[grammar] ~25-~25: Ensure spelling is correct
Context: ...nd has when using it and what each flag corosponds to sh command <flag1> <flag2>

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~25-~25: Ensure spelling is correct
Context: ...sing it and what each flag corosponds to sh command <flag1> <flag2>

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In docs/content/user/modules/example_module_docs.md around lines 23 to 25, fix
the spelling mistakes in the template guidance: change "ment" to "meant",
"permisions" to "permissions", "specifiy" to "specify", and "corosponds" to
"corresponds", preserving the original sentence structure and emphasis markers.

Copy link

@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: 0

🧹 Nitpick comments (1)
docs/content/faq/index.md (1)

13-35: Structure and content are clear; minor capitalization inconsistency to address.

The new Q&A sections are well-organized and provide helpful guidance. However, there's a capitalization inconsistency with "GitHub": line 29 uses lowercase "github" while line 35 uses "Github". For consistency with proper nouns, both should use "GitHub".

🔎 Proposed capitalization fix
-**A:** Open a github issue with the "[FEATURE]" or open a pull-request and we'll think about it.
+**A:** Open a GitHub issue with the "[FEATURE]" or open a pull-request and we'll think about it.
-**A:** Feel free to open a Github issue or ask in the [Discord](https://discord.gg/gpmSjcjQxg).
+**A:** Feel free to open a GitHub issue or ask in the [Discord](https://discord.gg/gpmSjcjQxg).
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f4630e and 3c45907.

📒 Files selected for processing (1)
  • docs/content/faq/index.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

Follow documentation standards as defined in docs/docs.mdc, docs/patterns.mdc, docs/principals.mdc, docs/structure.mdc, docs/style.mdc, and docs/syntax.mdc

Files:

  • docs/content/faq/index.md
🪛 LanguageTool
docs/content/faq/index.md

[style] ~33-~33: Using many exclamation marks might seem excessive (in this case: 4 exclamation marks for a text that’s 919 characters long)
Context: ...tions Q: I need help setting up Tux! A: Feel free to open a Github issu...

(EN_EXCESSIVE_EXCLAMATION)

⏰ 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). (2)
  • GitHub Check: Run All Tests (3.13.8)
  • GitHub Check: Sourcery review

…ocumentation

- Introduced a new section on proper formatting for nested lists, emphasizing the need for a blank line between bold list items and their nested bullet points to ensure correct rendering.
- Provided examples to illustrate the correct and incorrect formatting practices.
- Revised command examples for assigning and unassigning roles to include explicit parameter labels, enhancing readability and understanding.
- Updated documentation to reflect the new syntax format for role commands, ensuring consistency across the documentation.
…d groups, features, and modules

- Introduced templates for documenting commands, command groups, features, and modules to ensure consistency and clarity across the documentation.
- Each template includes structured outlines, placeholders for key information, and guidelines for usage to assist contributors in creating comprehensive documentation.
- Updated the index to provide an overview of available templates and instructions on how to use them effectively.
- Introduced a new index file for the documentation section, providing an overview of templates and resources for creating consistent documentation for Tux.
- Included links to various templates such as Module, Command, Command Group, and Feature templates to assist contributors in documentation efforts.
- Enhanced the documentation for the Bookmarks feature, detailing how to save and manage important messages in Discord.
- Updated the GIF Limiter section to clarify its functionality in preventing GIF spam through rate limiting.
- Revised the XP & Leveling documentation to explain the XP earning process and role assignment upon leveling up.
- Improved the Starboard feature documentation to outline how popular messages are highlighted based on reactions.
- Clarified the Status Roles feature, detailing how roles are assigned based on users' custom status messages using regex patterns.
- Updated the Temp VC documentation to explain the automatic creation and management of temporary voice channels.
- Deleted the example_module_docs file, which provided an overview and guidelines for documenting modules and commands. This change helps streamline the documentation by removing outdated or redundant content.
…cumentation

- Added comprehensive sections for Moderation, Utility, Fun, Info, Snippets, Tools, Levels, and Config modules, enhancing the user guide's navigation.
- Removed the outdated Modules section to streamline the documentation and improve organization.
- Introduced a new Docs section in the reference, including templates for various documentation types to assist contributors.
- Set the extends property to null to remove inherited rules.
- Changed MD024 to check only sibling headings, enhancing heading structure validation.
- Introduced the Fun module, detailing entertainment commands for Discord servers.
- Added documentation for the Random command group, including coin flips, dice rolls, magic 8-ball, and number generation.
- Included documentation for the XKCD command group, allowing users to fetch and share comics from xkcd.com.
- Provided usage examples, command syntax, and related commands to enhance user understanding and engagement.
…ed commands

- Introduced detailed documentation for the Info module, covering commands to retrieve information about Discord entities such as users, channels, and servers.
- Added specific documentation for the `/avatar`, `/membercount`, and `/info` commands, including syntax, parameters, usage examples, and permissions.
- Enhanced user understanding by providing structured information and related command links.
…elated commands

- Introduced detailed documentation for the Levels module, covering XP tracking and leveling system for Discord servers.
- Added specific documentation for the `/level` and `/levels` commands, including syntax, parameters, usage examples, and permissions.
- Enhanced user understanding by providing structured information on command groups, common use cases, and configuration requirements.
…ated commands

- Introduced the Tools module, detailing utility commands for enhanced functionality within Discord.
- Added specific documentation for the `/tldr` and `/wolfram` commands, including syntax, parameters, usage examples, and permissions.
- Enhanced user understanding by providing structured information on common use cases and related documentation links.
- Deleted outdated documentation files for Fun, Info, Levels, Moderation, Snippets, Tools, and Utility modules.
- Renamed the User Commands section to Modules for better clarity and organization.
- Updated the section header to reflect the new focus on modules, indicating ongoing work in progress.
…nd related commands

- Introduced the Snippets module, detailing commands for creating, managing, and using code snippets and aliases within Discord.
- Added documentation for the `$createsnippet`, `$deletesnippet`, `$editsnippet`, `$snippet`, `$snippets`, `$snippetinfo`, and `$togglesnippetlock` commands, including syntax, parameters, usage examples, and permissions.
- Enhanced user understanding by providing structured information on common use cases, error handling, and related commands.
… related commands

- Introduced the Utility module, detailing various commands for server management and user interaction.
- Added documentation for commands including `/afk`, `/encode`, `/poll`, `/remindme`, `/run`, `/self_timeout`, `/timezones`, and `/wiki`, covering syntax, parameters, usage examples, and permissions.
- Enhanced user understanding by providing structured information on command groups, common use cases, and related commands.
…ands

- Introduced the Moderation module, detailing commands for managing server behavior and user interactions.
- Added documentation for commands including `/ban`, `/kick`, `/warn`, `/timeout`, `/jail`, `/unjail`, `/tempban`, `/clearafk`, `/purge`, `/report`, and others, covering syntax, parameters, usage examples, and permissions.
- Enhanced user understanding by providing structured information on command groups, common workflows, and related commands.
…elated commands

- Introduced the Config module, detailing the configuration and management system for guilds.
- Added documentation for commands including `/config overview`, `/config ranks`, `/config roles`, `/config commands`, and `/config logs`, covering syntax, parameters, usage examples, and permissions.
- Enhanced user understanding by providing structured information on command groups, common use cases, and related documentation links.
- Updated the VSCode settings to disable markdown validation for improved editing experience.
kzndotsh and others added 11 commits January 12, 2026 14:59
…ime fields

- Eliminated redundant `sa_type` definitions for various datetime fields across models, enhancing clarity and consistency in model definitions.
- Streamlined the codebase by simplifying timestamp field handling, following recent refactoring efforts.
…redundant usage inclusion

- Updated error handler configurations to set `include_usage` to `False` for specific exceptions, as usage is already included in the message format.
- Enhanced clarity and maintainability of error handling logic by reducing redundancy in configuration settings.
- Updated the delete statement in the test for model relationships to use `column("id")` instead of directly referencing `Guild.id`, ensuring proper execution of the SQL delete operation.
- This change enhances the clarity and correctness of the test implementation.
…tions

- Introduced a new migration to alter various datetime fields across multiple tables, changing their types from `TIMESTAMP(timezone=True)` to `DateTime()`.
- This change enhances consistency in datetime handling and aligns with recent refactoring efforts to simplify model definitions.
- Updated fields include `created_at`, `updated_at`, `case_expires_at`, and others across tables such as `afk`, `cases`, `guild`, and `permission_assignments`.
…rds and quality assurance

- Introduced a new documentation file outlining the Deslop command, detailing steps for producing high-quality documentation that adheres to Tux project standards.
- Included guidelines on research protocols, writing consistency, accuracy standards, cross-referencing, and content quality to ensure comprehensive and maintainable documentation.
- Emphasized mandatory self-audit procedures and common anti-patterns to avoid, enhancing the overall documentation process.
…ty and completeness

- Revised sections on Docker Compose setup, connection configuration, and security best practices to enhance clarity and readability.
- Added detailed connection information, including default settings and environment variable configurations.
- Improved troubleshooting guidance for connection and migration issues, ensuring users have clear steps to resolve common problems.
- Updated language for consistency and removed outdated warnings, making the documentation more user-friendly.
…r clarity and completeness

- Removed the "work in progress" warning to indicate readiness for use.
- Improved clarity in configuration priority and file paths for environment variables.
- Added detailed examples for Discord bot settings, database configuration, logging, and external services.
- Updated troubleshooting guidance and validation steps for better user experience.
- Enhanced overall structure and readability of the documentation.
- Changed the default PostgreSQL password from "tuxpass" to "ChangeThisToAStrongPassword123!" to improve security practices.
- Updated examples in the field description to reflect the new default password.
…iciency

- Revised PostgreSQL database and user creation instructions for conciseness.
- Streamlined the installation steps for `uv`, removing unnecessary user context switches.
- Clarified the configuration and service setup sections, ensuring commands are more straightforward.
- Enhanced troubleshooting guidance for common issues related to database connections and permissions.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Copy link

@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

Caution

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

⚠️ Outside diff range comments (3)
src/tux/database/models/models.py (1)

57-60: Default factories create timezone-aware datetimes for naive columns.

These fields use datetime.now(UTC) in their default factories, producing timezone-aware datetimes, but the database columns are now naive DateTime. This is the same issue noted in base.py.

Affected fields:

  • Guild.guild_joined_at (line 58)
  • AFK.since (line 959)
  • Levels.last_message (line 1059)

If intentionally storing naive datetimes, update the default factories to produce naive UTC times:

🔧 Suggested fix (if naive UTC is intended)
     guild_joined_at: datetime | None = Field(
-        default_factory=lambda: datetime.now(UTC),
+        default_factory=lambda: datetime.now(UTC).replace(tzinfo=None),
         description="Timestamp when the bot joined this guild",
     )

Apply similarly to AFK.since and Levels.last_message.

Also applies to: 958-961, 1058-1061

src/tux/database/models/base.py (1)

34-47: Remove datetime.now(UTC) from soft_delete() or restore DateTime(timezone=True) to preserve timezone info.

The deleted_at field uses a naive DateTime column but is assigned a timezone-aware datetime (datetime.now(UTC) at line 239). This causes silent loss of timezone information when the value is persisted and retrieved, breaking any code that expects timezone awareness.

Either:

  • Restore DateTime(timezone=True) in the field definitions and database schema, or
  • Change soft_delete() to use datetime.now(timezone.utc).replace(tzinfo=None) and document that all stored timestamps are UTC-naive.

The same inconsistency affects created_at and updated_at (lines 34–47), which use database defaults but will read back as naive datetimes while the application handles timezone-aware ones elsewhere.

docs/content/selfhost/config/environment.md (1)

30-42: Remove leading indentation from code blocks.

Multiple code blocks throughout the file have 4-space leading indentation. In Markdown, code blocks should not be indented unless they are part of a list item. This indentation may cause rendering issues or unintended nesting.

Example fixes for proper formatting

For the Discord Bot Settings section (lines 30-42), remove the leading spaces:

 ### Discord Bot Settings
 
 Set your Discord bot token and basic bot settings:
-
-    ```env
+
+```env
 # Required: Discord bot token
 BOT_TOKEN=your_bot_token_here
 
@@ -40,7 +40,7 @@
 
 # System admin user IDs (comma-separated)
 USER_IDS__SYSADMINS=123456789012345678,987654321098765432
-    ```
+```

Apply this same fix to all other indented code blocks throughout the file.

Also applies to: 50-56, 60-63, 74-80, 86-95, 103-115, 121-127, 133-139, 145-151, 159-161, 167-191, 197-201, 207-214, 222-225, 231-234, 240-243, 249-257

🤖 Fix all issues with AI agents
In @.cursor/commands/documentation/docs-serve.md:
- Line 259: The "Related guide" link on the "Related guide: [Documentation
Development
Guide](../../../docs/content/developer/guides/documentation-development.md)"
line is broken; either remove this line or replace the URL with an existing
guide (for example ../../../docs/content/developer/guides/index.md or
../../../docs/content/developer/guides/creating-cursor-commands.md) so the link
points to a real file; update the link text if you change the target to keep it
accurate.

In @docs/content/selfhost/install/baremetal.md:
- Line 163: The systemd service's ExecStart currently points at
/usr/local/bin/uv which mismatches the uv installer (installed to ~/.local/bin
in the install script at line 79); update the service file so ExecStart resolves
uv via PATH (for example use /usr/bin/env uv or run the command through a shell
that uses the invoking user's PATH) or alternatively document and instruct a
system-wide installation that places the uv binary in /usr/local/bin (include
the sudo install instruction in the docs). Ensure both the service file's
ExecStart and the docs/install instructions are consistent (also apply the same
fix to the second occurrence mentioned around line 177).

In @docs/content/selfhost/install/docker.md:
- Around line 67-73: The Docker guide currently instructs manual copying/editing
of config/config.toml and .env, which is inconsistent with the bare-metal
guide's use of the uv run config generate command; update the Docker
instructions to use the same workflow by replacing the manual config steps with
"uv run config generate" (to create config/config.toml) and keeping the existing
cp .env.example .env step, or alternatively add a short note explaining why
Docker must use manual copy/edit while bare-metal uses uv run config generate,
referencing the uv run config generate command and the config/config.toml and
.env files so readers understand the difference.

In
@src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py:
- Line 13: The file contains an unused top-level import "sqlmodel"; remove that
import statement so the migration module doesn't include unused dependencies
(delete the line that imports sqlmodel).
🧹 Nitpick comments (8)
src/tux/shared/config/models.py (1)

422-434: Password should be URL-encoded in the connection string.

If POSTGRES_PASSWORD contains special characters like @, :, /, or #, the constructed URL will be malformed. Since the new default and examples encourage special characters, this becomes more likely.

♻️ Proposed fix using urllib.parse

Add the import at the top of the file:

from urllib.parse import quote_plus

Then update the URL construction:

-        return f"postgresql://{self.POSTGRES_USER}:{self.POSTGRES_PASSWORD}@{self.POSTGRES_HOST}:{self.POSTGRES_PORT}/{self.POSTGRES_DB}"
+        return f"postgresql://{self.POSTGRES_USER}:{quote_plus(self.POSTGRES_PASSWORD)}@{self.POSTGRES_HOST}:{self.POSTGRES_PORT}/{self.POSTGRES_DB}"
src/tux/services/handlers/error/config.py (1)

441-462: Consider removing duplicate dictionary entries.

Several exception types appear multiple times in ERROR_CONFIG_MAP (e.g., commands.CheckAnyFailure, commands.PrivateMessageOnly, commands.NoPrivateMessage, commands.MissingRole, commands.BotMissingRole). Python dictionaries keep only the last value for duplicate keys, so the earlier entries (lines 236–275) are silently overwritten by these later entries. Some duplicates have differing message formats (e.g., discord.ConnectionClosed at lines 412–415 vs 583–586), which could cause confusion about intended behavior.

This isn't introduced by this PR, but a future cleanup pass could consolidate these entries to reduce confusion and potential maintenance issues.

tests/database/test_database_model_relationships.py (1)

8-8: Consider using ORM attribute reference instead of dynamic column.

Using column("id") creates an unbound column reference that bypasses SQLAlchemy's compile-time validation. The ORM attribute Guild.id is more idiomatic, type-safe, and ensures the column name stays in sync with the model.

♻️ Suggested change
-from sqlalchemy import column
 from sqlmodel import delete as sql_delete
             await session.execute(
-                sql_delete(Guild).where(column("id") == TEST_GUILD_ID),
+                sql_delete(Guild).where(Guild.id == TEST_GUILD_ID),
             )

If this change was intentional due to a specific SQLModel issue, please document it with a comment explaining the reason.

Also applies to: 129-131

src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py (1)

23-171: Migration will convert timezone-aware timestamps to naive datetimes.

This migration alters all timestamp columns from TIMESTAMP(timezone=True) to naive DateTime. For existing production data:

  1. PostgreSQL will strip the timezone offset, keeping the timestamp value as-is
  2. If timestamps were stored as UTC, they remain correct but lose explicit UTC marking
  3. If the server timezone changes later, interpretation of these values becomes ambiguous

Consider documenting in the migration docstring:

  • The rationale for this change
  • That all existing timestamps are assumed to be in UTC
  • Any operational considerations (e.g., ensure server timezone is UTC)
📝 Add documentation to migration
 """
 Revision ID: b1f7c2286248
 Revises: 55296ad22e23
 Create Date: 2026-01-04 00:28:51.797978+00:00
+
+Convert timestamp columns from timezone-aware to naive DateTime.
+
+Rationale: Standardize on naive UTC timestamps across the schema.
+All existing timestamps are assumed to be stored in UTC.
+
+Note: Ensure the database server timezone is set to UTC for consistent
+interpretation of naive timestamp values.
 """
.cursor/commands/documentation/deslop-docs.md (1)

55-55: Add missing reference to See Also section.

Line 55 references @docs/zensical.mdc, but this file is not included in the "See Also" section (lines 155-165). For consistency, either add it to the See Also section or update the reference to match an already-listed file like @docs/syntax.mdc.

📝 Suggested addition to See Also section

Add this line after line 164:

 - Related rule: @docs/syntax.mdc - Zensical syntax reference
+- Related rule: @docs/zensical.mdc - Zensical configuration and features
 - Related rule: @docs/structure.mdc - Documentation organization
.cursor/commands/documentation/update-docs.md (1)

5-5: Optional: Hyphenate compound adjective "high-quality".

The phrase "high quality standards" uses a compound adjective modifying "standards." According to standard style guides, it should be hyphenated as "high-quality standards" when appearing before the noun.

✏️ Suggested fix
-Comprehensively update documentation to reflect code changes, new features, configuration updates, or structural changes. This command ensures documentation stays current with the codebase and maintains high quality standards.
+Comprehensively update documentation to reflect code changes, new features, configuration updates, or structural changes. This command ensures documentation stays current with the codebase and maintains high-quality standards.
docs/content/selfhost/install/baremetal.md (1)

82-83: Provide more specific PATH guidance.

The note about updating PATH is vague. Consider adding specific examples for common shells to help users complete the installation successfully.

Suggested improvement
 !!! note "Update PATH"
-    Ensure `uv` is in your PATH. You may need to source your shell profile or add it to your PATH manually.
+    The installer will display instructions for adding `uv` to your PATH. For most users:
+    
+    **Bash/Ubuntu:** Add to `~/.bashrc`:
+    ```bash
+    export PATH="$HOME/.local/bin:$PATH"
+    ```
+    
+    **Zsh:** Add to `~/.zshrc`:
+    ```bash
+    export PATH="$HOME/.local/bin:$PATH"
+    ```
+    
+    Then reload your shell: `source ~/.bashrc` (or `~/.zshrc`)
docs/content/selfhost/config/database.md (1)

80-80: Consider using more obvious placeholders in connection string examples.

The example connection strings use password as the password placeholder, but line 111 lists "password" as a weak password to avoid. While these are clearly examples, users might copy-paste without changing the password.

Consider using more obvious placeholders like YOUR_PASSWORD_HERE or <your-strong-password> to reduce the risk of accidental use.

📝 Suggested placeholder improvements
 # Example: AWS RDS
-DATABASE_URL=postgresql://tuxuser:password@your-instance.region.rds.amazonaws.com:5432/tuxdb?sslmode=require
+DATABASE_URL=postgresql://tuxuser:YOUR_PASSWORD_HERE@your-instance.region.rds.amazonaws.com:5432/tuxdb?sslmode=require
 
 # Example: DigitalOcean
-DATABASE_URL=postgresql://tuxuser:password@your-host.db.ondigitalocean.com:25060/tuxdb?sslmode=require
+DATABASE_URL=postgresql://tuxuser:YOUR_PASSWORD_HERE@your-host.db.ondigitalocean.com:25060/tuxdb?sslmode=require

And for consistency, update line 80:

-DATABASE_URL=postgresql://tuxuser:password@localhost:5432/tuxdb
+DATABASE_URL=postgresql://tuxuser:YOUR_PASSWORD_HERE@localhost:5432/tuxdb

Also applies to: 95-95, 98-98

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae1d4d8 and 38beb7c.

⛔ Files ignored due to path filters (2)
  • flake.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (15)
  • .cursor/commands/documentation/deslop-docs.md
  • .cursor/commands/documentation/docs-serve.md
  • .cursor/commands/documentation/generate-docs.md
  • .cursor/commands/documentation/update-docs.md
  • docs/content/selfhost/config/database.md
  • docs/content/selfhost/config/environment.md
  • docs/content/selfhost/install/baremetal.md
  • docs/content/selfhost/install/docker.md
  • docs/content/selfhost/install/first-run.md
  • src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py
  • src/tux/database/models/base.py
  • src/tux/database/models/models.py
  • src/tux/services/handlers/error/config.py
  • src/tux/shared/config/models.py
  • tests/database/test_database_model_relationships.py
💤 Files with no reviewable changes (1)
  • docs/content/selfhost/install/first-run.md
🧰 Additional context used
📓 Path-based instructions (10)
.cursor/**/*.{mdc,md}

📄 CodeRabbit inference engine (AGENTS.md)

Validate Cursor rules and commands before committing

Files:

  • .cursor/commands/documentation/generate-docs.md
  • .cursor/commands/documentation/docs-serve.md
  • .cursor/commands/documentation/update-docs.md
  • .cursor/commands/documentation/deslop-docs.md
**/*.md

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

Follow documentation standards as defined in docs/docs.mdc, docs/patterns.mdc, docs/principals.mdc, docs/structure.mdc, docs/style.mdc, and docs/syntax.mdc

Files:

  • docs/content/selfhost/config/environment.md
  • docs/content/selfhost/install/docker.md
  • docs/content/selfhost/config/database.md
  • docs/content/selfhost/install/baremetal.md
**/**/models.py

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

Follow SQLModel database model patterns as defined in database/models.mdc

Files:

  • src/tux/shared/config/models.py
  • src/tux/database/models/models.py
**/*.py

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

**/*.py: Follow Pytest configuration and patterns as defined in testing/pytest.mdc
Follow input validation as defined in security/validation.mdc
Follow error handling patterns as defined in error-handling/patterns.mdc
Follow loguru logging patterns as defined in error-handling/logging.mdc
Follow Sentry integration as defined in error-handling/sentry.mdc

**/*.py: Use strict type hints with Type | None syntax instead of Optional[Type] in Python
Use NumPy docstring format for documenting Python functions and classes
Prefer absolute imports, with relative imports allowed only within the same module
Organize imports in order: stdlib → third-party → local, with imports at the top of the file unless absolutely necessary
Use 88 character line length for Python code
Use snake_case for functions and variables, PascalCase for classes, UPPER_CASE for constants in Python
Ensure all type hints are complete for function signatures
Add docstrings for all public APIs
Keep Python files to a maximum of 1600 lines
Use async/await for I/O operations instead of blocking calls
Use custom exceptions for business logic errors
Log with context when handling errors
Do not store secrets in code, use environment variables for configuration
Validate all user inputs in Python code
One class or function per file when possible

Files:

  • src/tux/shared/config/models.py
  • src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py
  • tests/database/test_database_model_relationships.py
  • src/tux/services/handlers/error/config.py
  • src/tux/database/models/models.py
  • src/tux/database/models/base.py
**/migrations/versions/*.py

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

Follow Alembic migration patterns as defined in database/migrations.mdc

Files:

  • src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py
src/tux/database/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/tux/database/**/*.py: Use SQLModel for type-safe ORM operations
Use Pydantic for data validation in database models
Use transactions for multi-step database operations
Implement model-level validation in database models
Optimize database queries for performance

Files:

  • src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py
  • src/tux/database/models/models.py
  • src/tux/database/models/base.py
src/tux/database/migrations/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use Alembic for database migrations

Files:

  • src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py
**/*test*.py

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

**/*test*.py: Follow test marker conventions as defined in testing/markers.mdc
Follow async testing patterns as defined in testing/async.mdc

Files:

  • tests/database/test_database_model_relationships.py
tests/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use pytest markers (unit, integration, slow, database, async) for test categorization

Files:

  • tests/database/test_database_model_relationships.py
src/tux/services/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/tux/services/**/*.py: Use dependency injection in service classes
Keep service classes stateless where possible and use async/await for I/O
Use caching for frequently accessed data

Files:

  • src/tux/services/handlers/error/config.py
🧠 Learnings (4)
📚 Learning: 2025-12-30T22:44:56.692Z
Learnt from: CR
Repo: allthingslinux/tux PR: 0
File: .cursor/rules/rules.mdc:0-0
Timestamp: 2025-12-30T22:44:56.692Z
Learning: Applies to **/*.md : Follow documentation standards as defined in docs/docs.mdc, docs/patterns.mdc, docs/principals.mdc, docs/structure.mdc, docs/style.mdc, and docs/syntax.mdc

Applied to files:

  • .cursor/commands/documentation/generate-docs.md
  • .cursor/commands/documentation/update-docs.md
  • .cursor/commands/documentation/deslop-docs.md
📚 Learning: 2025-12-30T22:45:12.307Z
Learnt from: CR
Repo: allthingslinux/tux PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T22:45:12.307Z
Learning: Applies to src/tux/database/migrations/**/*.py : Use Alembic for database migrations

Applied to files:

  • src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py
  • docs/content/selfhost/config/database.md
  • src/tux/database/models/base.py
📚 Learning: 2025-12-30T22:45:12.307Z
Learnt from: CR
Repo: allthingslinux/tux PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T22:45:12.307Z
Learning: Applies to src/tux/database/**/*.py : Use SQLModel for type-safe ORM operations

Applied to files:

  • src/tux/database/models/models.py
  • src/tux/database/models/base.py
📚 Learning: 2025-12-30T22:45:12.307Z
Learnt from: CR
Repo: allthingslinux/tux PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T22:45:12.307Z
Learning: Applies to src/tux/database/**/*.py : Use Pydantic for data validation in database models

Applied to files:

  • src/tux/database/models/base.py
🧬 Code graph analysis (3)
src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py (1)
scripts/db/schema.py (1)
  • schema (26-72)
tests/database/test_database_model_relationships.py (1)
src/tux/database/models/models.py (1)
  • Guild (35-171)
src/tux/services/handlers/error/config.py (1)
src/tux/services/handlers/error/extractors.py (1)
  • extract_missing_flag_details (195-245)
🪛 LanguageTool
.cursor/commands/documentation/docs-serve.md

[style] ~41-~41: Consider an alternative adverb to strengthen your wording.
Context: ....) - Confirm tables and lists format properly - Check that math equations render (...

(PROPERLY_THOROUGHLY)


[style] ~109-~109: Consider an alternative adverb to strengthen your wording.
Context: ...ly - Verify all processes terminate properly - Check that ports are released ...

(PROPERLY_THOROUGHLY)

docs/content/selfhost/config/environment.md

[style] ~283-~283: Using many exclamation marks might seem excessive (in this case: 9 exclamation marks for a text that’s 3747 characters long)
Context: ...) uv run tux start --debug ``` !!! note "Automatic .env Loading" Tux a...

(EN_EXCESSIVE_EXCLAMATION)

.cursor/commands/documentation/update-docs.md

[grammar] ~5-~5: Use a hyphen to join words.
Context: ...ent with the codebase and maintains high quality standards. ## Steps 1. **Ident...

(QB_NEW_EN_HYPHEN)

.cursor/commands/documentation/deslop-docs.md

[grammar] ~1-~1: Ensure spelling is correct
Context: # Deslop Documentation ## Overview Produce hig...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ 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: Run All Tests (3.13.8)
🔇 Additional comments (16)
src/tux/shared/config/models.py (1)

400-407: Improved default password clarity.

The change from tuxpass to ChangeThisToAStrongPassword123! is a good improvement—the self-documenting name makes it obvious this is a placeholder that must be changed before production use.

src/tux/services/handlers/error/config.py (3)

201-206: LGTM!

Setting include_usage=False is correct since the message format already includes the {usage} placeholder populated by the extract_bad_union_argument_details extractor. This prevents duplicate usage information in error messages.


305-310: LGTM!

Consistent with the BadUnionArgument change—the {usage} placeholder in the message format is populated by the detail extractor, so disabling the automatic usage inclusion avoids duplication.


311-316: LGTM!

The relevant code snippet confirms extract_missing_flag_details returns the usage key, which the message format already references via {usage}. Setting include_usage=False correctly prevents duplication.

src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py (1)

174-322: Downgrade function is complete and correct.

The downgrade properly reverses all column type changes and preserves server defaults. Good migration hygiene.

.cursor/commands/documentation/generate-docs.md (2)

237-241: Verify the reference syntax for Cursor rules.

The commands /update-docs and /docs-serve are correctly defined and exist. However, the rule references use @docs/ prefix while the actual files are located at .cursor/rules/docs/. Confirm whether @docs/ is valid Cursor syntax for referencing .cursor/rules/docs/ rules, or if references should be updated to @rules/docs/. This pattern is used consistently across other documentation commands, so clarification is needed to ensure consistency with Cursor's reference conventions.


87-87: Commands verified and working correctly.

The documented commands uv run docs build and uv run docs serve are properly implemented in scripts/docs/build.py and scripts/docs/serve.py respectively. Both commands are integrated into the Typer CLI framework, validate the presence of zensical.toml before execution, and delegate to the zensical documentation tool as intended. All dependencies are configured correctly.

docs/content/selfhost/install/docker.md (2)

30-32: Good organizational improvement.

Moving the Podman tip to follow the prerequisites section improves the document flow, allowing users to first understand the standard requirements before learning about alternatives.


60-61: LGTM - More specific clone path.

Specifying /opt/tux as the destination is clearer than cloning to /opt and improves the installation workflow.

docs/content/selfhost/config/environment.md (4)

245-259: Excellent addition for Docker users.

The Docker Configuration section clearly explains how Docker Compose handles environment variables and provides helpful cross-references. This bridges the gap between environment configuration and Docker deployment.


277-286: Clear testing guidance with helpful note.

The environment testing section provides clear commands and the note about automatic .env loading prevents user confusion. The static analysis warning about excessive exclamation marks is a false positive—it's counting the !!! admonition syntax.


316-320: Practical troubleshooting guidance.

The added troubleshooting entries for configuration file loading provide specific, actionable steps including path verification, permission checks, and the validation command. This aligns well with the earlier config path updates.


17-19: Documentation is accurate. The application does support both root-level and config/ subdirectory paths for configuration files, with the subdirectory variant taking priority (e.g., config/config.toml loads before config.toml). No changes needed.

docs/content/selfhost/install/baremetal.md (2)

193-209: Clear maintenance procedures.

The update workflow using sudo commands is consistent with the system-wide installation approach, and the note about automatic migrations is helpful.


227-229: Comprehensive troubleshooting guidance.

The expanded troubleshooting section provides specific diagnostics including PostgreSQL service checks, database existence verification, authentication configuration (pg_hba.conf), and path validation. These are practical additions that will help users resolve common issues.

docs/content/selfhost/config/database.md (1)

1-279: Overall documentation quality is excellent.

This database configuration guide is comprehensive, well-structured, and user-friendly. It effectively covers:

  • Quick start for Docker users
  • Detailed connection configuration options
  • Security best practices with clear warnings
  • Comprehensive troubleshooting guidance
  • Practical command examples

The security warnings (default password, auto-login, production considerations) are appropriately placed and emphasized. The progression from quick start to detailed configuration to troubleshooting provides a good user experience for both beginners and advanced users.

Note: Cannot verify full compliance with project-specific documentation standards as the reference files (docs/docs.mdc, docs/patterns.mdc, docs/principals.mdc, docs/structure.mdc, docs/style.mdc, docs/syntax.mdc) were not included in the review context.

Group=tux
WorkingDirectory=/opt/tux
ExecStart=/home/tux/.local/bin/uv run tux start
ExecStart=/usr/local/bin/uv run tux start
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Path mismatch between installation and service configuration.

The uv installation script (line 79) typically installs to ~/.local/bin for user installations, but the systemd service file specifies /usr/local/bin/uv. This mismatch will cause the service to fail to start.

Consider either:

  1. Documenting a system-wide uv installation that places the binary in /usr/local/bin, or
  2. Updating the service file to use a more reliable path resolution
Potential solution using PATH

Update the service file to rely on PATH instead of hard-coding:

 [Service]
 Type=simple
 WorkingDirectory=/opt/tux
-ExecStart=/usr/local/bin/uv run tux start
+ExecStart=/bin/bash -c 'uv run tux start'
+Environment="PATH=/usr/local/bin:/usr/bin:/bin:~/.local/bin"
 Restart=always
 RestartSec=10

Alternatively, instruct users to create a system-wide uv installation:

# Install uv system-wide
sudo curl -LsSf https://astral.sh/uv/install.sh | sudo sh -s -- --install-dir /usr/local/bin

Also applies to: 177-177

🤖 Prompt for AI Agents
In @docs/content/selfhost/install/baremetal.md at line 163, The systemd
service's ExecStart currently points at /usr/local/bin/uv which mismatches the
uv installer (installed to ~/.local/bin in the install script at line 79);
update the service file so ExecStart resolves uv via PATH (for example use
/usr/bin/env uv or run the command through a shell that uses the invoking user's
PATH) or alternatively document and instruct a system-wide installation that
places the uv binary in /usr/local/bin (include the sudo install instruction in
the docs). Ensure both the service file's ExecStart and the docs/install
instructions are consistent (also apply the same fix to the second occurrence
mentioned around line 177).


from alembic import op
import sqlalchemy as sa
import sqlmodel
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Unused import.

The sqlmodel import is not used in this migration file.

🧹 Remove unused import
 from alembic import op
 import sqlalchemy as sa
-import sqlmodel
 from sqlalchemy.dialects import postgresql
🤖 Prompt for AI Agents
In
@src/tux/database/migrations/versions/2026_01_04_0028-b1f7c2286248_fix_datetime_timezone_types_after_.py
at line 13, The file contains an unused top-level import "sqlmodel"; remove that
import statement so the migration module doesn't include unused dependencies
(delete the line that imports sqlmodel).

- Updated the `soft_delete` method in `SoftDeleteMixin` to remove timezone information from the `deleted_at` field.
- Adjusted `default_factory` for datetime fields in `Guild`, `AFK`, and `Levels` models to ensure consistency by stripping timezone info from timestamps.
… usage

- Added new flags for server configuration, including `--dev-addr` for specifying IP and port, and `--open` for auto-opening the browser on start.
- Revised troubleshooting and testing sections for clarity, including updated commands and improved guidance for common issues.
- Enhanced examples to reflect new command usage and streamline the documentation for better user experience.
- Revised installation instructions in the Docker setup to use a configuration generation command.
- Corrected links in the GIF limiter and status roles documentation for accurate navigation.
- Simplified the starboard management commands table by removing unnecessary columns.
- Updated related documentation links in the levels module for consistency.
- Clarified the ban command usage by specifying a minimal reason.
- Improved wording in the clearafk documentation regarding user timeouts.
- Enhanced Markdown formatting instructions in the createsnippet documentation.
- Standardized terminology in the poll and remindme documentation sections for better readability.
Copy link

@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: 9

🤖 Fix all issues with AI agents
In @docs/content/user/features/gif-limiter.md:
- Line 23: Update the sentence that describes how Tux detects GIFs to explicitly
state that the check for the substring "gif" is case-insensitive; e.g., change
"checking for the word 'gif' in the message body" to "checking for the word
'gif' (case-insensitive) in the message body" so readers know that variants like
"GIF" or "Gif" will trigger the limiter.
- Line 150: The link at docs/content/user/features/gif-limiter.md currently
points to '../../../admin/config/commands.md' which is inconsistent with the
other reference; update this link to '../../admin/config/commands.md' so both
references match (replace the string '../../../admin/config/commands.md' with
'../../admin/config/commands.md').

In @docs/content/user/features/starboard.md:
- Line 111: Update the broken relative links in
docs/content/user/features/starboard.md: replace the two occurrences of
"../../../admin/config/commands.md" (at the references noted in the review) with
"../../admin/config/commands.md" so they point to the existing
docs/content/admin/config/commands.md; ensure both instances (the one near line
111 and the one near line 158) are changed for consistency.

In @docs/content/user/features/status-roles.md:
- Line 161: The sentence about case sensitivity is incorrect/confusing; update
it to state the actual default and show the correct flag to change behavior —
e.g., if default is case-sensitive, say "By default, regex matching is
case-sensitive; use (?i) to enable case-insensitive matching" or if the default
is case-insensitive, say "By default, regex matching is case-insensitive; use
(?-i) to force case-sensitive matching"; replace the existing line referencing
`(?i)` with the appropriate corrected phrasing and example.

In @docs/content/user/modules/levels/levels.md:
- Around line 62-74: Add a missing subcommand heading "#### setxp" above the
existing description of the setxp subcommand so the section follows the same
structure as other subcommands (e.g., "#### set", "#### reset"); update the
block that describes the /levels setxp syntax and parameters to be under this
new "#### setxp" heading and ensure the heading appears immediately before the
sentence "Set a member's XP to a specific value..." so navigation and TOC
generation remain consistent.
- Around line 91-102: Add a missing subcommand heading for the blacklist
section: insert a "#### blacklist" heading immediately before the paragraph that
begins "Toggle a member's ability to gain experience points..." so the block
describing the `/levels blacklist` and `$levels blacklist <member>` usage is
preceded by the subcommand heading; update the surrounding headings to match the
existing subcommand structure used elsewhere in the Levels documentation.
- Around line 152-154: The link in levels.md pointing to
"../../admin/config/index.md" is broken; update the markdown link target from
"../../admin/config/index.md" to "../../modules/config/index.md" (or confirm and
point to the intended configuration doc) so the "Admin Configuration Guide" link
resolves correctly.

In @docs/content/user/modules/moderation/clearafk.md:
- Around line 71-77: The "Usage Examples" section currently shows only one
example; update the doc to match the title by adding the suggested examples or
change the heading to singular. Prefer adding two additional examples: add a
"Using Prefix Command" subsection with a code block showing "$clearafk @user"
and an "Using Alias" subsection with a code block showing "$unafk @user",
keeping the existing "Basic Clear AFK" example (/clearafk member:@user).

In @docs/content/user/modules/utility/remindme.md:
- Around line 73-78: The docs currently describe plain-text confirmation and DM
but the bot actually sends embed-based messages: update the "Response Format"
section to state that the confirmation is an embed with the title "Reminder Set"
and a description using Discord timestamp format (e.g., "Reminder set for
<t:TIMESTAMP:f>."), and update the "Reminder DM" description to say the DM is an
embed containing only the reminder text (no timestamp or original-message
reference); reference the embed title "Reminder Set" and the use of the Discord
timestamp token <t:TIMESTAMP:f> so readers can match the implementation.
🧹 Nitpick comments (9)
src/tux/database/models/base.py (1)

236-239: Consider documenting the "naive UTC" convention.

The pattern datetime.now(UTC).replace(tzinfo=None) creates a naive datetime that is implicitly UTC. While this works, the convention that all naive datetimes in the database layer represent UTC time is not documented. Consider adding a comment or updating the class/module docstring to clarify this convention for future maintainers.

📝 Suggested documentation addition
 class SoftDeleteMixin(SQLModel):
     """
     Mixin for soft delete functionality.
 
     Provides:
     - deleted_at: Timestamp when record was soft-deleted
     - is_deleted: Boolean flag for soft delete status
+
+    Note:
+        All datetime values are stored as naive datetimes representing UTC time.
     """
src/tux/database/models/models.py (1)

958-961: LGTM with optional DRY improvement.

The lambda lambda: datetime.now(UTC).replace(tzinfo=None) is repeated across Guild.guild_joined_at, AFK.since, Levels.last_message, and SoftDeleteMixin.soft_delete(). Consider extracting a shared helper function in base.py for consistency and to document the convention in one place.

♻️ Optional: Extract helper function

In base.py:

def utc_now_naive() -> datetime:
    """Return current UTC time as a naive datetime.
    
    All naive datetimes in the database layer represent UTC time.
    """
    return datetime.now(UTC).replace(tzinfo=None)

Then use throughout:

-    default_factory=lambda: datetime.now(UTC).replace(tzinfo=None),
+    default_factory=utc_now_naive,
docs/content/user/modules/moderation/clearafk.md (1)

11-13: Consider splitting the long introduction sentence.

The introduction on line 13 contains multiple clauses that could be split for improved readability.

♻️ Suggested improvement
-The `clearafk` command (also available as `unafk`) allows server moderators to manually remove a member's AFK status. This is useful if a user becomes active but the automatic AFK removal fails, or if a moderator needs to reset a user's nickname back to its original state after they set an AFK message.
+The `clearafk` command (also available as `unafk`) allows server moderators to manually remove a member's AFK status. This is useful when:
+
+- A user becomes active but the automatic AFK removal fails
+- A moderator needs to reset a user's nickname after they set an AFK message
docs/content/user/features/gif-limiter.md (1)

94-96: Consider varying the phrasing for improved readability.

The phrase "Needed to" is repeated three times consecutively. While clear, varying the phrasing slightly can improve readability.

✏️ Suggested improvement
 - **Read Messages** - Needed to monitor channel activity for GIFs.
-- **Manage Messages** - Needed to delete messages that exceed the limits.
-- **Send Messages** - Needed to post the temporary moderation notifications.
+- **Manage Messages** - Required to delete messages that exceed the limits.
+- **Send Messages** - Used to post the temporary moderation notifications.

Based on static analysis hints.

.cursor/commands/documentation/docs-serve.md (1)

7-111: Consider adding a "Quick Start" section for basic usage.

The 15-step comprehensive workflow is thorough and valuable for complete validation, but users who simply want to preview documentation quickly may find it overwhelming. Consider adding a brief "Quick Start" section at the beginning with just the essential steps:

## Quick Start

For basic documentation preview:
1. Build documentation: `uv run docs build`
2. Start server: `uv run docs serve`
3. Open browser to `http://localhost:8000`
4. Stop server with Ctrl+C when done

For comprehensive testing and validation, follow the detailed steps below.

This provides an immediate path for casual users while preserving the detailed workflow for thorough validation.

docs/content/user/modules/utility/remindme.md (1)

80-93: Optional: Consider more concise phrasing.

Line 93 could be slightly more concise by replacing "is greater than" with "exceeds", though the current phrasing is perfectly clear for users.

-- Make sure the duration is greater than zero
+- Make sure the duration exceeds zero
docs/content/user/features/starboard.md (3)

100-105: Consider varying the phrasing for better readability.

The permission descriptions use "Needed to" five times consecutively. While clear, varying the sentence structure would improve flow and readability.

✍️ Proposed alternative phrasing
 Tux requires the following permissions for this feature:
 
-- **Read Message History** - Needed to fetch the content of starred messages.
-- **Send Messages** - Needed to post to the starboard channel.
-- **Embed Links** - Needed to create the formatted starboard posts.
-- **Manage Messages** - Needed to remove posts if they fall below the threshold.
-- **Attach Files** - Needed to forward attachments to the starboard.
+- **Read Message History** - Required to fetch the content of starred messages.
+- **Send Messages** - Allows Tux to post to the starboard channel.
+- **Embed Links** - Enables creation of formatted starboard posts.
+- **Manage Messages** - Required to remove posts that fall below the threshold.
+- **Attach Files** - Allows forwarding attachments to the starboard.

153-153: Consider more specific phrasing than "very old".

The phrase "very old messages" is vague. If there's a specific time limit (e.g., Discord's message history API limits), stating it would be more helpful. If the limit is unknown, consider phrasing like "older messages" or "messages from the distant past."

✍️ Suggested alternatives

If a specific timeframe is known:

-- **Historical Content:** Starring very old messages may not work if Tux cannot retrieve them from Discord's history.
+- **Historical Content:** Starring messages older than [specific timeframe] may not work due to Discord API limitations.

If the timeframe is unknown:

-- **Historical Content:** Starring very old messages may not work if Tux cannot retrieve them from Discord's history.
+- **Historical Content:** Starring older messages may not work if Tux cannot retrieve them from Discord's message history.

22-36: Consider consolidating or clarifying "Mechanics" and "Automation" sections.

Both subsections describe automated behaviors of the starboard system, and their purposes overlap:

  • Mechanics covers tracking, updates, and anti-gaming
  • Automation covers automatic posting, deletion, and syncing

Consider whether these could be:

  1. Combined into a single "Automation & Tracking" section
  2. Renamed for clearer distinction (e.g., "Message Tracking" and "Automated Actions")

The current structure works, but consolidation might reduce redundancy and improve flow.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 38beb7c and 3bf606a.

📒 Files selected for processing (14)
  • .cursor/commands/documentation/docs-serve.md
  • docs/content/selfhost/install/docker.md
  • docs/content/user/features/gif-limiter.md
  • docs/content/user/features/starboard.md
  • docs/content/user/features/status-roles.md
  • docs/content/user/modules/levels/level.md
  • docs/content/user/modules/levels/levels.md
  • docs/content/user/modules/moderation/ban.md
  • docs/content/user/modules/moderation/clearafk.md
  • docs/content/user/modules/snippets/createsnippet.md
  • docs/content/user/modules/utility/poll.md
  • docs/content/user/modules/utility/remindme.md
  • src/tux/database/models/base.py
  • src/tux/database/models/models.py
✅ Files skipped from review due to trivial changes (1)
  • docs/content/user/modules/moderation/ban.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/content/user/modules/utility/poll.md
  • docs/content/selfhost/install/docker.md
  • docs/content/user/modules/snippets/createsnippet.md
🧰 Additional context used
📓 Path-based instructions (5)
**/*.md

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

Follow documentation standards as defined in docs/docs.mdc, docs/patterns.mdc, docs/principals.mdc, docs/structure.mdc, docs/style.mdc, and docs/syntax.mdc

Files:

  • docs/content/user/features/gif-limiter.md
  • docs/content/user/modules/moderation/clearafk.md
  • docs/content/user/features/status-roles.md
  • docs/content/user/features/starboard.md
  • docs/content/user/modules/utility/remindme.md
  • docs/content/user/modules/levels/level.md
  • docs/content/user/modules/levels/levels.md
**/*.py

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

**/*.py: Follow Pytest configuration and patterns as defined in testing/pytest.mdc
Follow input validation as defined in security/validation.mdc
Follow error handling patterns as defined in error-handling/patterns.mdc
Follow loguru logging patterns as defined in error-handling/logging.mdc
Follow Sentry integration as defined in error-handling/sentry.mdc

**/*.py: Use strict type hints with Type | None syntax instead of Optional[Type] in Python
Use NumPy docstring format for documenting Python functions and classes
Prefer absolute imports, with relative imports allowed only within the same module
Organize imports in order: stdlib → third-party → local, with imports at the top of the file unless absolutely necessary
Use 88 character line length for Python code
Use snake_case for functions and variables, PascalCase for classes, UPPER_CASE for constants in Python
Ensure all type hints are complete for function signatures
Add docstrings for all public APIs
Keep Python files to a maximum of 1600 lines
Use async/await for I/O operations instead of blocking calls
Use custom exceptions for business logic errors
Log with context when handling errors
Do not store secrets in code, use environment variables for configuration
Validate all user inputs in Python code
One class or function per file when possible

Files:

  • src/tux/database/models/base.py
  • src/tux/database/models/models.py
src/tux/database/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

src/tux/database/**/*.py: Use SQLModel for type-safe ORM operations
Use Pydantic for data validation in database models
Use transactions for multi-step database operations
Implement model-level validation in database models
Optimize database queries for performance

Files:

  • src/tux/database/models/base.py
  • src/tux/database/models/models.py
.cursor/**/*.{mdc,md}

📄 CodeRabbit inference engine (AGENTS.md)

Validate Cursor rules and commands before committing

Files:

  • .cursor/commands/documentation/docs-serve.md
**/**/models.py

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

Follow SQLModel database model patterns as defined in database/models.mdc

Files:

  • src/tux/database/models/models.py
🧠 Learnings (4)
📚 Learning: 2025-12-30T22:45:12.307Z
Learnt from: CR
Repo: allthingslinux/tux PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T22:45:12.307Z
Learning: Applies to src/tux/database/**/*.py : Use SQLModel for type-safe ORM operations

Applied to files:

  • src/tux/database/models/base.py
  • src/tux/database/models/models.py
📚 Learning: 2025-12-30T22:45:12.307Z
Learnt from: CR
Repo: allthingslinux/tux PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T22:45:12.307Z
Learning: Applies to src/tux/database/**/*.py : Use Pydantic for data validation in database models

Applied to files:

  • src/tux/database/models/base.py
📚 Learning: 2025-12-30T22:45:12.307Z
Learnt from: CR
Repo: allthingslinux/tux PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T22:45:12.307Z
Learning: Applies to src/tux/database/migrations/**/*.py : Use Alembic for database migrations

Applied to files:

  • src/tux/database/models/base.py
📚 Learning: 2025-12-30T22:45:12.307Z
Learnt from: CR
Repo: allthingslinux/tux PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T22:45:12.307Z
Learning: Applies to src/tux/database/**/*.py : Implement model-level validation in database models

Applied to files:

  • src/tux/database/models/base.py
🪛 LanguageTool
docs/content/user/features/gif-limiter.md

[style] ~96-~96: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...xceed the limits. - Send Messages - Needed to post the temporary moderation notificat...

(REP_NEED_TO_VB)


[style] ~101-~101: Using many exclamation marks might seem excessive (in this case: 7 exclamation marks for a text that’s 4816 characters long)
Context: ...limits unless the channel is excluded. !!! info "Permission System" Configure ...

(EN_EXCESSIVE_EXCLAMATION)

docs/content/user/features/starboard.md

[style] ~102-~102: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... starboard channel. - Embed Links - Needed to create the formatted starboard posts. -...

(REP_NEED_TO_VB)


[style] ~103-~103: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...tarboard posts. - Manage Messages - Needed to remove posts if they fall below the thr...

(REP_NEED_TO_VB)


[style] ~153-~153: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...ver. - Historical Content: Starring very old messages may not work if Tux cannot ret...

(EN_WEAK_ADJECTIVE)

.cursor/commands/documentation/docs-serve.md

[style] ~41-~41: Consider an alternative adverb to strengthen your wording.
Context: ....) - Confirm tables and lists format properly - Check that math equations render (...

(PROPERLY_THOROUGHLY)


[style] ~109-~109: Consider an alternative adverb to strengthen your wording.
Context: ...ly - Verify all processes terminate properly - Check that ports are released ...

(PROPERLY_THOROUGHLY)

docs/content/user/modules/utility/remindme.md

[grammar] ~12-~12: Ensure spelling is correct
Context: ...mmands - utility - reminders --- # Remindme The remindme command is a personal pro...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~93-~93: This phrasing could be wordy, so try replacing it with something more concise.
Context: ... and 12 hours) - Make sure the duration is greater than zero ## Behavior Notes - **DMs requir...

(MORE_THAN_EXCEEDS)

docs/content/user/modules/levels/level.md

[uncategorized] ~14-~14: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...owing how close you are to reaching the next level milestone. Users can also use this com...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

docs/content/user/modules/levels/levels.md

[style] ~128-~128: Using many exclamation marks might seem excessive (in this case: 9 exclamation marks for a text that’s 3292 characters long)
Context: ...assigned/removed during level changes. !!! info "Configuration Guide" For deta...

(EN_EXCESSIVE_EXCLAMATION)

🔇 Additional comments (23)
src/tux/database/models/base.py (3)

18-19: LGTM!

Import adjustments are correct for the new server_default usage with text().


34-47: LGTM!

Good use of server_default for database-managed timestamps. This ensures consistent timestamp generation at the database level and aligns with the migration to naive datetime storage.


216-216: LGTM!

Field simplification is appropriate; SQLModel infers the DateTime type from the type hint.

src/tux/database/models/models.py (3)

25-25: LGTM!

Import cleanup is correct; DateTime is no longer needed after removing explicit type declarations.


57-60: LGTM!

Consistent application of the naive UTC datetime pattern.


1058-1061: LGTM!

Consistent with the naive UTC datetime pattern applied throughout the codebase.

docs/content/user/modules/levels/level.md (2)

1-86: Documentation structure looks good.

The documentation is well-structured with clear sections covering syntax, parameters, usage examples, response format, and related information. The content is comprehensive and user-friendly.


85-86: Internal documentation links are valid.

Both referenced files exist: levels.md is present in the same directory, and ../../features/leveling.md resolves correctly to the leveling system guide. No action required.

docs/content/user/modules/moderation/clearafk.md (8)

1-9: LGTM!

The front matter is well-structured with appropriate metadata for a command documentation page.


15-33: LGTM!

The syntax documentation clearly covers both command formats and includes aliases.


35-39: LGTM!

The parameters table is clear and properly formatted.


41-53: LGTM!

The operational flow explanation is clear and helps users understand the command's behavior.


79-84: LGTM!

The response format documentation clearly describes the expected behavior.


86-123: LGTM!

The error handling section is comprehensive and well-structured, providing clear guidance for each error scenario.


124-126: The referenced file exists at the expected location. The related commands section is correct.


68-69: The referenced documentation file exists at the expected location. The relative path ../../../admin/config/commands.md correctly resolves to docs/content/admin/config/commands.md, which is present in the repository.

.cursor/commands/documentation/docs-serve.md (1)

127-127: Documentation is accurate and requires no changes.

The --strict flag is correctly documented with the caveat that it's "not yet supported by zensical" for the serve command. The flag is defined in the code but explicitly raises an error when used (see scripts/docs/serve.py lines 47-49), making the documentation accurate. Documenting the flag alongside the clear limitation is the appropriate approach—it prevents user confusion by being explicit about what is unsupported rather than silently omitting it.

docs/content/user/modules/utility/remindme.md (6)

1-14: LGTM! Clear introduction and proper metadata.

The front matter is well-structured with appropriate tags, and the introduction clearly explains the command's purpose and delivery mechanism.


55-71: LGTM! Practical examples with clear use cases.

The examples effectively demonstrate both short-term and long-term reminder scenarios.


101-103: Related command link is valid. The afk.md file exists in the same directory, so the link will work correctly.


1-103: Documentation standard files referenced in guidelines do not exist in the repository.

The coding guidelines require compliance with documentation standards defined in docs/docs.mdc, docs/patterns.mdc, docs/principals.mdc, docs/structure.mdc, docs/style.mdc, and docs/syntax.mdc. However, none of these files are present in the repository. The original review comment cannot be acted upon until these standard files are created or the guidelines are updated to reference existing standards.

Likely an incorrect or invalid review comment.


95-99: All claims in the Behavior Notes section are accurate. The implementation confirms:

  • Reminders are persisted in the database (Reminder model at src/tux/database/models/models.py)
  • The on_ready handler loads all pending reminders and reschedules them using bot.loop.call_later()
  • Reminders will be delivered after bot restarts as long as the restart occurs before expiration
  • Time accuracy is based on the bot's UTC system clock

16-53: All verification points confirmed—no changes required.

The command implementation supports compound time formats (e.g., 1d12h), the remind alias is registered alongside rm, and parameter types match the documented STRING types.


- **Channel-wide limits**: Maximum number of GIFs allowed in a channel within a time window
- **Per-user limits**: Maximum number of GIFs a single user can post in a channel within a time window
Tux inspects all incoming messages for GIF content by checking for the word "gif" in the message body and the presence of Discord embeds.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify case sensitivity of GIF detection.

The documentation states that Tux checks for the word "gif" in the message body, but it doesn't specify whether this check is case-sensitive. Users may be confused about whether "GIF", "Gif", or "gif" will trigger the limiter.

Consider adding a brief clarification, such as: "checking for the word 'gif' (case-insensitive) in the message body" or documenting the exact matching behavior.

🤖 Prompt for AI Agents
In @docs/content/user/features/gif-limiter.md at line 23, Update the sentence
that describes how Tux detects GIFs to explicitly state that the check for the
substring "gif" is case-insensitive; e.g., change "checking for the word 'gif'
in the message body" to "checking for the word 'gif' (case-insensitive) in the
message body" so readers know that variants like "GIF" or "Gif" will trigger the
limiter.

### Monitoring
- **Custom Status Only:** Only the text in the "Custom Status" field is checked; "Playing", "Streaming", or "Listening" activities are ignored.
- **Bot Exemption:** Bots cannot receive status roles to avoid potential loops or unintended behavior.
- **Case Sensitivity:** By default, regex matching is case-insensitive unless the pattern explicitly handles it (e.g., `(?i)`).
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify or correct the case sensitivity limitation.

The statement is confusing: "By default, regex matching is case-insensitive unless the pattern explicitly handles it (e.g., (?i))." The (?i) flag enables case-insensitive matching, so if that's already the default behavior, this example doesn't illustrate overriding it.

If you want to show how to make matching case-sensitive, consider using (?-i) or a similar flag. If the point is to emphasize case-insensitivity, rephrase for clarity.

📝 Suggested clarification

If the default is case-insensitive and you want to document overriding to case-sensitive:

-- **Case Sensitivity:** By default, regex matching is case-insensitive unless the pattern explicitly handles it (e.g., `(?i)`).
+- **Case Sensitivity:** By default, regex matching is case-insensitive. To enforce case-sensitive matching, use patterns that explicitly disable it (e.g., `(?-i)` in some regex engines, or check your implementation's documentation).

Or, if you want to clarify the default without suggesting override:

-- **Case Sensitivity:** By default, regex matching is case-insensitive unless the pattern explicitly handles it (e.g., `(?i)`).
+- **Case Sensitivity:** Regex matching is case-insensitive by default, so "Linux", "linux", and "LINUX" will all match the same pattern.
🤖 Prompt for AI Agents
In @docs/content/user/features/status-roles.md at line 161, The sentence about
case sensitivity is incorrect/confusing; update it to state the actual default
and show the correct flag to change behavior — e.g., if default is
case-sensitive, say "By default, regex matching is case-sensitive; use (?i) to
enable case-insensitive matching" or if the default is case-insensitive, say "By
default, regex matching is case-insensitive; use (?-i) to force case-sensitive
matching"; replace the existing line referencing `(?i)` with the appropriate
corrected phrasing and example.

Comment on lines 152 to 154
- [`/level`](level.md) - View user-facing rank cards
- [XP & Leveling Feature](../../features/leveling.md) - Complete guide to the leveling system
- [Admin Configuration Guide](../../admin/config/index.md)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that the linked documentation files exist

echo "Checking for linked documentation files..."
echo ""

# Check level.md in same directory
if [ -f "docs/content/user/modules/levels/level.md" ]; then
  echo "✓ level.md exists at docs/content/user/modules/levels/level.md"
else
  echo "✗ level.md NOT found at docs/content/user/modules/levels/level.md"
fi

# Check leveling feature doc
if [ -f "docs/content/user/features/leveling.md" ]; then
  echo "✓ leveling.md exists at docs/content/user/features/leveling.md"
else
  echo "✗ leveling.md NOT found at docs/content/user/features/leveling.md"
fi

# Check admin config index
if [ -f "docs/content/user/admin/config/index.md" ]; then
  echo "✓ admin/config/index.md exists at docs/content/user/admin/config/index.md"
else
  echo "✗ admin/config/index.md NOT found at docs/content/user/admin/config/index.md"
fi

echo ""
echo "Listing available documentation structure:"
find docs/content/user -type f -name "*.md" | head -30

Repository: allthingslinux/tux

Length of output: 1610


Fix broken documentation link.

The link to ../../admin/config/index.md (line 153) is incorrect. The file does not exist at that path. Based on the repository structure, consider linking to ../../modules/config/index.md instead, or verify the intended destination for configuration documentation.

Working links:

  • level.md
  • ../../features/leveling.md

Broken link:

  • ../../admin/config/index.md
🤖 Prompt for AI Agents
In @docs/content/user/modules/levels/levels.md around lines 152 - 154, The link
in levels.md pointing to "../../admin/config/index.md" is broken; update the
markdown link target from "../../admin/config/index.md" to
"../../modules/config/index.md" (or confirm and point to the intended
configuration doc) so the "Admin Configuration Guide" link resolves correctly.

Comment on lines +71 to +77
## Usage Examples

### Basic Clear AFK

```text
/clearafk member:@user
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Inconsistency between section title and content.

The section is titled "Usage Examples" (plural) but only provides one example. Consider either adding more examples (e.g., using the prefix command or unafk alias) or changing the title to "Usage Example" (singular).

📝 Suggested additions
 ### Basic Clear AFK
 
 ```text
 /clearafk member:@user

+### Using Prefix Command
+
+text +$clearafk @user +
+
+### Using Alias
+
+text +$unafk @user +

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In @docs/content/user/modules/moderation/clearafk.md around lines 71 - 77, The
"Usage Examples" section currently shows only one example; update the doc to
match the title by adding the suggested examples or change the heading to
singular. Prefer adding two additional examples: add a "Using Prefix Command"
subsection with a code block showing "$clearafk @user" and an "Using Alias"
subsection with a code block showing "$unafk @user", keeping the existing "Basic
Clear AFK" example (/clearafk member:@user).


</details>

<!-- fingerprinting:phantom:triton:puma -->

<!-- This is an auto-generated comment by CodeRabbit -->

…arameters

- Added explanations for the `reason` parameter across various moderation commands, clarifying its usage in both prefix and slash commands.
- Updated related documentation links for consistency and accuracy.
- Improved formatting and descriptions in the command templates to enhance user understanding.
@kzndotsh kzndotsh marked this pull request as ready for review January 12, 2026 20:39
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @kzndotsh, your pull request is larger than the review limit of 150000 diff characters

@kzndotsh kzndotsh merged commit a8bce93 into main Jan 12, 2026
25 of 26 checks passed
@kzndotsh kzndotsh deleted the fix/docs branch January 12, 2026 20:41
Comment on lines 55 to 61
)

guild_joined_at: datetime | None = Field(
default_factory=lambda: datetime.now(UTC),
default_factory=lambda: datetime.now(UTC).replace(tzinfo=None),
description="Timestamp when the bot joined this guild",
)

Copy link

Choose a reason for hiding this comment

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

Bug: Comparing timezone-aware datetimes (e.g., datetime.now(UTC)) with newly timezone-naive database columns will raise a TypeError, causing crashes in moderation, AFK, and leveling systems.
Severity: CRITICAL

🔍 Detailed Analysis

The database migration changes several datetime columns to be timezone-naive (e.g., AFK.until, Case.case_expires_at, Levels.last_message). While model defaults are updated to store naive datetimes using .replace(tzinfo=None), other parts of the codebase continue to generate and use timezone-aware datetimes, typically datetime.now(UTC). This leads to TypeError exceptions when comparing or performing arithmetic between the timezone-aware values and the timezone-naive values fetched from the database. These errors will crash core, frequently-used features like AFK status checks, temporary ban expirations, and the XP leveling system on every message.

💡 Suggested Fix

Ensure all datetime objects are consistently timezone-naive before comparison or database storage. When creating a new datetime for comparison, use datetime.now(UTC).replace(tzinfo=None). When creating a datetime to be stored in the database, such as in moderation_coordinator.py, apply .replace(tzinfo=None) before insertion to match the model's schema and default factories.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/tux/database/models/models.py#L55-L61

Potential issue: The database migration changes several datetime columns to be
timezone-naive (e.g., `AFK.until`, `Case.case_expires_at`, `Levels.last_message`). While
model defaults are updated to store naive datetimes using `.replace(tzinfo=None)`, other
parts of the codebase continue to generate and use timezone-aware datetimes, typically
`datetime.now(UTC)`. This leads to `TypeError` exceptions when comparing or performing
arithmetic between the timezone-aware values and the timezone-naive values fetched from
the database. These errors will crash core, frequently-used features like AFK status
checks, temporary ban expirations, and the XP leveling system on every message.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8499854

Copy link

@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

🤖 Fix all issues with AI agents
In @docs/content/user/features/starboard.md:
- Around line 78-80: Update the code block for the slash command example to use
the correct language identifier (remove or replace "bash" with no language tag
or "text") and make the threshold consistent with the documented default: either
change the example command in the block to use "threshold:3" to match the table
or keep "threshold:5" but add a short inline note clarifying that the example
intentionally uses a higher threshold to reduce noise; update the block
containing "/starboard setup channel:#starboard emoji:⭐ threshold:5" accordingly
and ensure the surrounding text reflects the chosen option.
🧹 Nitpick comments (10)
docs/content/user/features/starboard.md (2)

100-104: Consider varying the phrasing to improve readability.

The repeated use of "Needed to" in the permissions list makes the content feel mechanical. Consider varying the language for better flow.

✨ Suggested improvement
 - **Read Message History** - Needed to fetch the content of starred messages.
-- **Send Messages** - Needed to post to the starboard channel.
-- **Embed Links** - Needed to create the formatted starboard posts.
-- **Manage Messages** - Needed to remove posts if they fall below the threshold.
-- **Attach Files** - Needed to forward attachments to the starboard.
+- **Send Messages** - Required for posting to the starboard channel.
+- **Embed Links** - Enables creation of formatted starboard posts.
+- **Manage Messages** - Allows removal of posts that fall below the threshold.
+- **Attach Files** - Permits forwarding of attachments to the starboard.

151-151: Consider clarifying "default Discord emojis".

The term "default Discord emojis" might be clearer as "standard Unicode emojis" to better distinguish from custom server emojis.

✨ Suggested clarification
-- **Emoji Types:** Currently only supports default Discord emojis; custom server emojis cannot be used for the starboard.
+- **Emoji Types:** Currently only supports standard Unicode emojis (⭐, ❤️, etc.); custom server emojis cannot be used for the starboard.
docs/content/reference/docs/templates/command-template.md (2)

73-76: Clarify that the reason parameter row is an example to be removed.

The parameter table includes both a placeholder row (line 75) and a specific example row for the reason parameter (line 76). This specific example with implementation details may confuse users who might not realize it should be removed or replaced. Consider adding a comment above line 76 indicating it's an example, or move it to the detailed descriptions section as a reference.

📝 Suggested clarification
 | Parameter | Type | Required | Description |
 |-----------|------|----------|-------------|
 | `{PARAMETER_NAME}` | {TYPE} | {Yes/No} | {Description} |
-| `reason` | String | No | The reason for the action. In prefix commands, this is a positional argument. In slash commands, it is a named parameter. Defaults to "No reason provided". |
+<!-- Example row (remove if not applicable):
+| `reason` | String | No | The reason for the action. In prefix commands, this is a positional argument. In slash commands, it is a named parameter. Defaults to "No reason provided". |
+-->

109-112: Clarify that the -silent flag row is an example to be removed.

Similar to the parameters section, the flags table includes a specific example row for the -silent flag (line 112) alongside the placeholder. This may lead to confusion about what should be replaced versus removed. Consider marking this as an example in a comment or removing it entirely from the template.

📝 Suggested clarification
 | Flag | Type | Default | Description |
 |------|------|---------|-------------|
 | `-{FLAG_NAME}` | {TYPE} | {DEFAULT} | {Description} |
-| `-silent` | Boolean | False | If true, Tux will not attempt to DM the user. |
+<!-- Example row (remove if not applicable):
+| `-silent` | Boolean | False | If true, Tux will not attempt to DM the user. |
+-->
docs/content/user/features/gif-limiter.md (1)

94-96: Consider varying the sentence structure for better readability.

The three permission descriptions all use the same "Needed to" phrasing. While clear, varying the structure would improve flow.

✍️ Suggested rephrasing
-- **Read Messages** - Needed to monitor channel activity for GIFs.
-- **Manage Messages** - Needed to delete messages that exceed the limits.
-- **Send Messages** - Needed to post the temporary moderation notifications.
+- **Read Messages** - Required to monitor channel activity for GIFs.
+- **Manage Messages** - Enables deletion of messages that exceed the limits.
+- **Send Messages** - Used to send temporary moderation notifications.
docs/content/user/modules/moderation/snippetunban.md (2)

35-40: Consider simplifying the parameters table.

The reason parameter description is quite detailed, explaining both prefix and slash command behavior inline. While informative, this makes the table cell dense. Consider moving the explanation about positional vs. named argument behavior to a note below the table for improved readability.


87-97: Minor wording improvement suggestion.

Line 92: "Attempt to DM the user informing them they can once again create and manage snippets" could be more concise. Consider: "Attempt to DM the user notifying them that snippet access has been restored."

docs/content/user/modules/levels/levels.md (1)

93-106: Consider clarifying toggle state visibility.

The blacklist command documentation mentions it "toggles" a member's ability to gain XP, but doesn't explain how administrators can check the current blacklist status of a user before running the command.

💡 Optional clarification

Consider adding a note about how to verify current blacklist status, or mention that the command provides feedback about the resulting state (e.g., "User blacklisted" vs "User removed from blacklist").

Example addition:

 **Parameters:**
 
 - `member` - The member to toggle the XP blacklist for.
+
+!!! tip "Checking Status"
+    The command provides feedback indicating whether the user was added to or removed from the blacklist.
docs/content/user/modules/moderation/pollban.md (1)

35-40: Consider simplifying the parameter descriptions.

The reason parameter description is quite verbose, explaining the difference between prefix and slash command handling in detail. Since this pattern appears across multiple command documentation pages, consider either:

  1. Simplifying to just the essential information in the table
  2. Adding a general note at the document level explaining how parameters work differently between command types

This would improve readability and reduce redundancy across the documentation suite.

docs/content/user/modules/moderation/timeout.md (1)

45-62: Clarify terminology for required duration parameter.

The -duration parameter is marked as "Required" in the Flags section, which may confuse users since flags typically imply optional modifiers. Consider one of the following approaches:

  1. Add a note explaining that while duration uses flag syntax in prefix commands, it's a required parameter
  2. Restructure to distinguish between required parameters and optional flags more clearly
  3. Add a general note about the terminology difference between slash command parameters and prefix command flags

This would help users understand that despite being in the "Flags" section, duration is mandatory for the command to work.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3bf606a and 81a5c2d.

📒 Files selected for processing (18)
  • docs/content/reference/docs/templates/command-template.md
  • docs/content/user/features/gif-limiter.md
  • docs/content/user/features/starboard.md
  • docs/content/user/modules/levels/levels.md
  • docs/content/user/modules/moderation/ban.md
  • docs/content/user/modules/moderation/jail.md
  • docs/content/user/modules/moderation/kick.md
  • docs/content/user/modules/moderation/pollban.md
  • docs/content/user/modules/moderation/pollunban.md
  • docs/content/user/modules/moderation/snippetban.md
  • docs/content/user/modules/moderation/snippetunban.md
  • docs/content/user/modules/moderation/tempban.md
  • docs/content/user/modules/moderation/timeout.md
  • docs/content/user/modules/moderation/unban.md
  • docs/content/user/modules/moderation/unjail.md
  • docs/content/user/modules/moderation/untimeout.md
  • docs/content/user/modules/moderation/warn.md
  • docs/content/user/modules/utility/remindme.md
✅ Files skipped from review due to trivial changes (2)
  • docs/content/user/modules/moderation/warn.md
  • docs/content/user/modules/moderation/unban.md
🚧 Files skipped from review as they are similar to previous changes (7)
  • docs/content/user/modules/moderation/tempban.md
  • docs/content/user/modules/moderation/untimeout.md
  • docs/content/user/modules/moderation/jail.md
  • docs/content/user/modules/moderation/pollunban.md
  • docs/content/user/modules/moderation/snippetban.md
  • docs/content/user/modules/moderation/unjail.md
  • docs/content/user/modules/moderation/ban.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md

📄 CodeRabbit inference engine (.cursor/rules/rules.mdc)

Follow documentation standards as defined in docs/docs.mdc, docs/patterns.mdc, docs/principals.mdc, docs/structure.mdc, docs/style.mdc, and docs/syntax.mdc

Files:

  • docs/content/user/modules/moderation/pollban.md
  • docs/content/user/modules/moderation/kick.md
  • docs/content/user/features/gif-limiter.md
  • docs/content/user/modules/moderation/snippetunban.md
  • docs/content/user/modules/levels/levels.md
  • docs/content/user/features/starboard.md
  • docs/content/reference/docs/templates/command-template.md
  • docs/content/user/modules/moderation/timeout.md
  • docs/content/user/modules/utility/remindme.md
🪛 LanguageTool
docs/content/user/features/gif-limiter.md

[style] ~96-~96: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...xceed the limits. - Send Messages - Needed to post the temporary moderation notificat...

(REP_NEED_TO_VB)


[style] ~101-~101: Using many exclamation marks might seem excessive (in this case: 7 exclamation marks for a text that’s 4816 characters long)
Context: ...limits unless the channel is excluded. !!! info "Permission System" Configure ...

(EN_EXCESSIVE_EXCLAMATION)

docs/content/user/modules/levels/levels.md

[style] ~132-~132: Using many exclamation marks might seem excessive (in this case: 9 exclamation marks for a text that’s 3310 characters long)
Context: ...assigned/removed during level changes. !!! info "Configuration Guide" For deta...

(EN_EXCESSIVE_EXCLAMATION)

docs/content/user/features/starboard.md

[style] ~102-~102: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... starboard channel. - Embed Links - Needed to create the formatted starboard posts. -...

(REP_NEED_TO_VB)


[style] ~103-~103: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...tarboard posts. - Manage Messages - Needed to remove posts if they fall below the thr...

(REP_NEED_TO_VB)


[style] ~153-~153: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...ver. - Historical Content: Starring very old messages may not work if Tux cannot ret...

(EN_WEAK_ADJECTIVE)

docs/content/reference/docs/templates/command-template.md

[style] ~269-~269: Using many exclamation marks might seem excessive (in this case: 12 exclamation marks for a text that’s 3071 characters long)
Context: ...iption and effect on command behavior} !!! info "Configuration Guide" See the ...

(EN_EXCESSIVE_EXCLAMATION)

docs/content/user/modules/moderation/timeout.md

[grammar] ~11-~11: Ensure spelling is correct
Context: ...uide - commands - moderation --- # Timeout The timeout command (also available as...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/content/user/modules/utility/remindme.md

[grammar] ~12-~12: Ensure spelling is correct
Context: ...mmands - utility - reminders --- # Remindme The remindme command is a personal pro...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~92-~92: This phrasing could be wordy, so try replacing it with something more concise.
Context: ... and 12 hours) - Make sure the duration is greater than zero ## Behavior Notes - **DMs requir...

(MORE_THAN_EXCEEDS)

⏰ 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). (2)
  • GitHub Check: Seer Code Review
  • GitHub Check: Run All Tests (3.13.8)
🔇 Additional comments (39)
docs/content/user/features/starboard.md (6)

1-18: LGTM! Clear and comprehensive introduction.

The front matter is well-structured, and the introduction effectively explains the starboard feature with appropriate emphasis on its automated, real-time nature.


20-44: LGTM! Well-organized technical explanation.

The three subsections (Mechanics, Automation, Triggers) provide a clear and logical breakdown of the feature's operation.


46-62: LGTM! User-focused and clear.

The separation of "What Users See" and "Interaction" provides a good user-centric view of the feature.


85-92: LGTM! Clear command reference.

The command table is concise and aligns with the commands mentioned throughout the document.


113-147: LGTM! Excellent troubleshooting structure.

The symptom-driven approach with clear causes and actionable solutions provides effective administrator guidance.


155-158: Both internal documentation links are valid and resolve correctly. The files index.md and commands.md exist at docs/content/admin/config/.

docs/content/reference/docs/templates/command-template.md (1)

1-282: Well-structured and comprehensive command documentation template.

The template provides excellent guidance for documenting commands with clear sections, helpful comments, and good examples of what to include. The distinction between Parameters and Flags (lines 63-71) is particularly helpful. The static analysis warning about exclamation marks is a false positive—these are admonition block markers (!!!), which is standard MkDocs Material syntax.

docs/content/user/features/gif-limiter.md (3)

19-43: Excellent restructuring of the feature mechanics.

The reorganization into Mechanics, Automation, and Triggers subsections provides a clear, logical flow that helps users understand how the feature works. The descriptions are accurate and well-detailed.


58-87: Clear and accurate TOML configuration examples.

The configuration section provides well-structured examples with helpful inline comments explaining the limits. The TOML syntax is correct, and the table clearly documents all available options.


1-150: Comprehensive and well-structured feature documentation.

The documentation rewrite significantly improves clarity and usability with:

  • Clear separation of mechanics, automation, and triggers
  • Practical TOML configuration examples
  • Structured troubleshooting with symptoms, causes, and solutions
  • Appropriate use of admonition blocks for important information

The static analysis warning about exclamation marks is a false positive—these are admonition markers (!!!), which is standard MkDocs Material syntax.

docs/content/user/modules/moderation/snippetunban.md (7)

1-13: Documentation structure looks good.

The front matter and introduction are well-structured and provide clear context for the command.


15-33: LGTM!

The syntax section clearly documents both slash and prefix command formats, with proper formatting.


42-56: LGTM!

The flags section is well-documented with clear type information, defaults, and aliases.


71-85: LGTM!

The usage examples clearly demonstrate both slash and prefix command formats with practical scenarios.


58-69: The referenced file docs/content/admin/config/commands.md exists and is correctly linked from the permissions section.


125-129: All related command documentation files referenced in the section exist at their expected locations. No issues found.


1-129: The referenced documentation standard files do not exist in the repository.

The coding guidelines reference six non-existent files: docs/docs.mdc, docs/patterns.mdc, docs/principals.mdc, docs/structure.mdc, docs/style.mdc, and docs/syntax.mdc. None of these files exist anywhere in the repository. The documentation cannot be verified against standards files that do not exist.

The snippetunban.md file itself follows the same structure and formatting conventions as other moderation command documentation in the repository (e.g., ban.md, cases.md), including standard markdown frontmatter, consistent heading hierarchy, parameter and flag tables, and code block formatting.

Likely an incorrect or invalid review comment.

docs/content/user/modules/levels/levels.md (9)

1-10: LGTM! Well-structured front matter.

The YAML metadata is complete and properly formatted with appropriate tags and icon reference for documentation navigation.


12-16: Clear and comprehensive introduction.

The introduction effectively explains the purpose and use cases for the administrative command group.


18-33: Excellent command syntax documentation.

Both slash and prefix command forms are documented, along with the alias. The behavior when invoked without a subcommand is clearly stated.


35-42: Helpful subcommands overview table.

The table provides an excellent quick reference with descriptions and example usage for each subcommand.


44-92: Well-documented subcommands with consistent structure.

Each subcommand is thoroughly documented with clear syntax for both slash and prefix forms, along with parameter descriptions. The consistent structure makes this easy to follow.


127-134: Concise configuration section with appropriate cross-reference.

The configuration section provides essential information and appropriately links to the detailed admin guide for more comprehensive configuration instructions.


136-152: Excellent practical examples.

The usage examples demonstrate real-world scenarios with clear context, making it easy for administrators to understand when and how to use these commands.


154-157: Cross-references are valid.

All three linked files exist at their specified paths:

  • level.md
  • ../../features/leveling.md
  • Admin config documentation ✓

108-125: Permissions section is accurate and properly documented.

The cross-referenced configuration guide exists, and the rank requirements (3-5 for Moderator) are consistent with the system's documented permission hierarchy. Both bot and user permission requirements are clearly specified, and the admonition boxes appropriately reference the permission configuration system.

docs/content/user/modules/moderation/pollban.md (3)

1-13: Documentation structure is clear and well-organized.

The front matter and introduction effectively establish the command's purpose and context.


71-130: Comprehensive examples and error handling.

The usage examples, response format, error handling, and related commands sections are thorough and user-friendly. The error handling particularly stands out with clear "When it occurs," "What happens," and "Solutions" subsections.


58-69: No issues identified. The Permissions section adheres to the documented style guide standards with proper heading hierarchy (H2 for section, H3 for subsections), correct use of the !!! info admonition component, and clear, well-organized content. The internal link syntax and formatting match the patterns defined in docs/content/reference/style-guide.md.

docs/content/user/modules/moderation/kick.md (1)

1-158: Consistent documentation structure across command pages.

The kick command documentation follows the same well-organized structure as pollban.md. The multiple usage examples (basic, with reason for both slash and prefix, and silent kick) effectively demonstrate the command's flexibility. The error handling section thoroughly covers common scenarios.

The same verbose parameter description pattern appears at line 40, which could benefit from the simplification suggested in the pollban.md review.

docs/content/user/modules/moderation/timeout.md (1)

1-44: Comprehensive timeout command documentation.

The documentation is thorough and well-structured:

  • Clear explanation of Discord's native timeout feature integration
  • Helpful warning admonition about the 28-day limit (lines 58-59)
  • Practical usage examples covering various scenarios
  • Detailed error handling including bot-specific limitations (lines 162-171)

The same verbose parameter description pattern appears at line 43, consistent with the other command documentation files.

Also applies to: 63-177

docs/content/user/modules/utility/remindme.md (8)

1-14: Well-structured documentation introduction.

The front matter metadata and introduction are clear and comprehensive. The description effectively communicates the command's purpose and key behavior (DM delivery).


16-34: Clear syntax documentation.

Both slash and prefix command formats are properly documented with correct Discord syntax conventions. The inclusion of aliases enhances usability.


36-53: Comprehensive parameter documentation.

The parameter table is well-formatted, and the supported time formats are clearly explained with helpful examples including combined units.


55-71: Practical usage examples.

The examples effectively demonstrate both short-term and long-term reminder scenarios with realistic use cases.


73-77: Clear response format documentation.

The documentation effectively describes both the confirmation message and the reminder delivery format, including Discord's timestamp notation.


79-92: Comprehensive error handling documentation.

The error handling section provides clear explanations and actionable solutions. The guidance is thorough and user-friendly.

Note: The static analysis suggestion about line 92 being "wordy" is a false positive—"greater than zero" is standard, clear technical language.


94-98: Important behavior notes clearly documented.

The behavior notes highlight critical aspects users need to know, particularly the DM requirement and persistence guarantees.


100-102: Link is valid and correctly implemented.

The afk.md file exists and the cross-reference is properly set up. Both files reciprocally link to each other, following the same pattern used throughout the documentation for related commands.

Comment on lines +78 to 80
```bash
/starboard setup channel:#starboard emoji:⭐ threshold:5
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix inconsistency and code block language identifier.

Two issues here:

  1. Inconsistent threshold values: The configuration table (line 74) shows the default threshold as 3, but the example uses threshold:5. This inconsistency may confuse users.
  2. Incorrect language identifier: Using bash for a Discord slash command is misleading. Discord commands aren't shell commands.
📝 Proposed fix
-```bash
+```
 /starboard setup channel:#starboard emoji:⭐ threshold:5

Also consider either:
- Changing the example to use `threshold:3` to match the documented default, or
- Adding a note explaining why the example uses a different value (e.g., "This example sets a higher threshold of 5 to reduce noise")

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In @docs/content/user/features/starboard.md around lines 78 - 80, Update the
code block for the slash command example to use the correct language identifier
(remove or replace "bash" with no language tag or "text") and make the threshold
consistent with the documented default: either change the example command in the
block to use "threshold:3" to match the table or keep "threshold:5" but add a
short inline note clarifying that the example intentionally uses a higher
threshold to reduce noise; update the block containing "/starboard setup
channel:#starboard emoji:⭐ threshold:5" accordingly and ensure the surrounding
text reflects the chosen option.


</details>

<!-- fingerprinting:phantom:triton:puma -->

<!-- This is an auto-generated comment by CodeRabbit -->

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.

3 participants