Leto-Reader icon indicating copy to clipboard operation
Leto-Reader copied to clipboard

feat: Add AI document insights and confirm mobile UX

Open aimEDGE opened this issue 8 months ago • 1 comments

Integrates AI-powered features to provide you with a summary and keywords upon loading a new document. Also includes a review of the existing UI for smartphone usability.

Key changes:

  • ReaderState: Extended with AISummary and AIKeywords properties to store AI-generated content.
  • AIService: Introduced a new service (AIService.cs) responsible for communicating with an AI provider (currently stubbed) to fetch summaries and keywords. This service is registered for dependency injection.
  • StateManager: Modified to utilize AIService. When a new document's content is added, it's processed by AIService, and the results are stored in the corresponding ReaderState object.
  • UI Display: The ReadingPlatform.razor component now displays the AI-generated summary and keywords in a new MudCard section if they are available for the current document.
  • Mobile UI Review: The UI components in ReadingPlatform.razor and ReaderView.razor (dialogs, controls) were reviewed. The existing responsive design using MudBlazor and Tailwind CSS was found to be robust and suitable for smartphone use, requiring no further changes.
  • Conceptual Tests: Test strategies were outlined for the new logic and UI components.

aimEDGE avatar May 22 '25 07:05 aimEDGE

Thank you for the new features. I have a problem: A method returning a task shouldn't return null. See https://stackoverflow.com/questions/13127177/if-my-interface-must-return-task-what-is-the-best-way-to-have-a-no-operation-imp

Alternative:

public static class TaskExtensions
{
    public static readonly Task CompletedTask = Task.FromResult(false);
}

...

Task completedTask = Task.CompletedTask;

Can the coding agent fix this too?

DavideWiest avatar May 22 '25 09:05 DavideWiest