Skip to content

feat(server): add DefaultShareExpiration config option #4082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 21, 2025
Merged

Conversation

caiocotts
Copy link
Member

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to ae98410 in 1 minute and 25 seconds. Click for details.
  • Reviewed 67 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. conf/configuration.go:75
  • Draft comment:
    Add a doc comment for DefaultShareExpiration (its units and purpose) to improve clarity.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The comment is asking for documentation which is generally good. However, the rules state "Do NOT make purely informative comments" and "Do NOT comment unless there is clearly a code change required." Documentation requests could be considered informative rather than requiring actual code changes. Additionally, the field's purpose seems fairly self-evident from its name and context among other sharing-related fields. The field's purpose may not be completely obvious to all developers. Having clear documentation could help prevent misuse or confusion about the time unit expectations. While documentation is valuable, this comment doesn't point out a clear problem that needs fixing. The field name is descriptive, its type (time.Duration) is clear, and its default value provides context about expected usage. The comment should be deleted as it requests purely informative documentation without identifying a clear code issue that needs to be fixed.
2. core/share.go:98
  • Draft comment:
    Nice refactor—using conf.Server.DefaultShareExpiration replaces a hardcoded value. Consider adding tests for custom expiration configs.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While the comment correctly identifies the change, suggesting tests is not strictly necessary here. The change itself is simple - just using a config value instead of a hardcoded one. Testing config values is typically done at a higher level, and the actual logic hasn't changed. The comment is more of a nice-to-have suggestion rather than identifying a clear issue that needs to be fixed. The suggestion for tests could be valuable for ensuring the config integration works correctly. Configuration changes can have subtle bugs. However, per the rules, we should not make comments unless there is clearly a code change required. Testing suggestions, while valuable, are not critical issues that need to be fixed. The comment should be removed as it's more of a suggestion than identifying a clear issue that needs to be fixed.
3. ui/src/index.css:3
  • Draft comment:
    CSS cleanup: font-family declaration formatting streamlined. Ensure consistency with project style.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_ju13mKxZOArrVU1r

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 5bd2cdb in 30 seconds. Click for details.
  • Reviewed 25 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. ui/src/index.css:3
  • Draft comment:
    Reformatted 'font-family' for body improves readability; ensure consistent style across the project.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. ui/src/index.css:11
  • Draft comment:
    Multi-line formatting for 'code' font-family is clear and consistent.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_ztEzWDXiuoFoqxLZ

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 9c56632 in 39 seconds. Click for details.
  • Reviewed 17 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. core/share.go:8
  • Draft comment:
    Reordered import for 'conf' is fine if consistent with our grouping conventions. Ensure that internal packages are grouped together (e.g., after third‑party packages) as per project standards.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. core/share.go:96
  • Draft comment:
    When setting s.ExpiresAt using conf.Server.DefaultShareExpiration, ensure that the config value is properly validated/non‐zero to avoid unexpected expiration behavior.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_YhyvYqOUr8SZj8y9

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@LynxCub LynxCub left a comment

Choose a reason for hiding this comment

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

looks good for DefaultShareExpiration

@deluan
Copy link
Member

deluan commented May 20, 2025

Thanks! We also need a PR to add this option to the docs

@deluan deluan merged commit fef1739 into master May 21, 2025
35 checks passed
@deluan deluan deleted the share-expiration branch May 21, 2025 02:17
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