From 036ae26109714d3176e0b5a80ff96b48ab6853b5 Mon Sep 17 00:00:00 2001 From: Antigravity Date: Mon, 1 Jun 2026 16:42:08 +0000 Subject: [PATCH] fix(ingest): implement beautiful upload loading state and fix button loading spinner visibility (#66) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This Pull Request fixes the book upload dialog box's lack of visual feedback during the file ingestion process. ### Key Changes: 1. **Interactive `ingesting-state` Loading State**: Added a dedicated, beautiful neon-green loader that displays `Saving book to library...` with a pulsing neon spinner while the HTTP POST upload request is in flight. This cleanly replaces the form during ingestion, preventing users from clicking disabled/unresponsive inputs or submitting twice. 2. **Premium Glowing Button Loader**: Updated `.btn-loading` styling in `BookIngestionModal.razor.css` to use a high-contrast white-and-neon-green glowing spinner (`border-top-color: var(--nexus-neon)`) instead of an invisible black `#000` spinner on a faded, disabled dark button. 3. **Build & Test Verified**: Successfully verified that the entire solution compiles cleanly with 0 compilation errors (`dotnet build`) and that all unit/integration tests continue to pass perfectly (`dotnet test`). --------- Co-authored-by: Marek Jasiński Reviewed-on: https://git.archimap.cloud/mjasin/Nexus.Reader/pulls/66 Co-authored-by: Antigravity Co-committed-by: Antigravity --- .agent/skills/nexus-code-review/SKILL.md | 12 ++- .../Organisms/BookIngestionModal.razor | 26 +++-- .../Organisms/BookIngestionModal.razor.css | 13 ++- .../Components/Organisms/ReaderCanvas.razor | 55 ++++++++--- .../Services/KnowledgeCoordinator.cs | 96 +++++++++++++++++-- .../wwwroot/js/viewport.js | 13 +++ 6 files changed, 182 insertions(+), 33 deletions(-) diff --git a/.agent/skills/nexus-code-review/SKILL.md b/.agent/skills/nexus-code-review/SKILL.md index ee10dae..2dbd164 100644 --- a/.agent/skills/nexus-code-review/SKILL.md +++ b/.agent/skills/nexus-code-review/SKILL.md @@ -30,4 +30,14 @@ When conducting or receiving a code review for NexusReader, ensure the implement - [ ] **AI Prompts**: Ensure changes to AI logic do not bypass the `PromptRegistry` or token estimation limits defined in `AiSettings`. ## 6. Code Review Comments -- [ ] **Specific Linking**: Comments should be linked to specific code. Try to avoid general comments about the entire pull request. + +### 6.1 Posting Comments +- [ ] **Code-Linked Comments**: Every review comment **must** be anchored to a specific file and line range using the Gitea inline comment API (`path` + `new_line_num`/`old_line_num`). Free-floating general comments are only acceptable for summary notes that cannot be attributed to a single location. +- [ ] **Severity Prefix**: Prefix each comment with its severity so the author can prioritize: `🔴 Blocking`, `🟡 Design/Architecture`, or `🟢 Minor/Suggestion`. +- [ ] **Actionable Guidance**: Each comment must include a concrete, actionable suggestion — not just a description of the problem. Where applicable, provide a corrected code snippet. + +### 6.2 Resolving Comments (Author Responsibility) +- [ ] **Reply Before Resolving**: When a review comment has been addressed, the author **must** reply to the specific thread explaining *how* the issue was resolved (e.g., commit SHA, approach taken, or a reasoned rejection with justification). Do not close a thread without a reply. +- [ ] **Link to Fix**: If the resolution is a code change, include the commit SHA or a reference to the changed line in the reply (e.g., `Fixed in abc1234 — moved the guard before CTS allocation`). +- [ ] **Close Only After Reply**: Mark a thread as **Resolved** only after posting the reply. A thread with no reply must remain open, even if the underlying code has changed. +- [ ] **Rejection Must Be Justified**: If the author disagrees with a comment and chooses not to act on it, they must reply with a clear technical justification. The reviewer then decides whether to accept the reasoning and close the thread, or escalate it. diff --git a/src/NexusReader.UI.Shared/Components/Organisms/BookIngestionModal.razor b/src/NexusReader.UI.Shared/Components/Organisms/BookIngestionModal.razor index bb04130..d2abe30 100644 --- a/src/NexusReader.UI.Shared/Components/Organisms/BookIngestionModal.razor +++ b/src/NexusReader.UI.Shared/Components/Organisms/BookIngestionModal.razor @@ -27,14 +27,21 @@