Skip to content

#8332: Tag files when AI generated content gets added#8446

Open
samin-z wants to merge 4 commits intomainfrom
feature/8332-tag-ai-generated
Open

#8332: Tag files when AI generated content gets added#8446
samin-z wants to merge 4 commits intomainfrom
feature/8332-tag-ai-generated

Conversation

@samin-z
Copy link
Copy Markdown

@samin-z samin-z commented Apr 10, 2026

📝 Summary

🖼️ Screenshots

Screenshot 2026-04-10 at 10 49 51

🚧 TODO

  • Add 'Generated By AI' tag to text files using Ai tools.

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/apis/ai.ts 0.00% 4 Missing ⚠️
src/components/Menu/AssistantAction.vue 0.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Apr 10, 2026
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
@samin-z samin-z marked this pull request as ready for review April 10, 2026 13:21
Comment on lines +19 to +22
/** @var IRequest|MockObject */
private $request;
/** @var AiTagService|MockObject */
private $aiTagService;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/** @var IRequest|MockObject */
private $request;
/** @var AiTagService|MockObject */
private $aiTagService;
private IRequest&MockObject $request;
private AiTagService&MockObject $aiTagService;

Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
@samin-z samin-z requested a review from CarlSchwan April 10, 2026 14:21
Copy link
Copy Markdown
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

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

Nitpicking, but otherwise looks good, did not test.

Comment thread lib/Service/AiTagService.php Outdated
*
* @return void
*
* @throws \Exception
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

that's not true, is it?

public function tagFileAsAiGenerated(int $fileId): void {
try {
$this->systemTagObjectMapper->assignGeneratedByAITag((string)$fileId, 'files');
} catch (\Exception $e) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is no signature in the called function that says it throws an Excpetion, or is there? Would then not do it, and avoid catching an Exception that should not be caught here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

you're right, I added @throws thinking the underlying call (assignTags) might throw at runtime but since I'm already catching everything in the try/catch it never reaches the caller anyway. i'll rwmove the annotation.

Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
@samin-z samin-z requested a review from blizzz April 15, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tag files when AI generated content gets added

3 participants