Skip to content

Remove dedicated History page - #28

Merged
DysektAI merged 3 commits into
masterfrom
fix/remove-history-page
Jul 30, 2026
Merged

Remove dedicated History page#28
DysektAI merged 3 commits into
masterfrom
fix/remove-history-page

Conversation

@DysektAI

@DysektAI DysektAI commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

  • remove the dedicated session History route and sidebar entry
  • retain a five-item, deduplicated Recent scans strip across navigation
  • rename the backing service to RecentScansService and remove page-only localization
  • publish exact enqueued scan batches so concurrent name/icon scans cannot omit an item from Recent scans
  • update presentation and queue regression coverage plus architecture/UI documentation

Runtime verification

Verified against the real WPF-hosted Blazor application with an isolated WebView2 profile:

  • sidebar contains Scan, Settings, and About, with no History entry
  • /app/history renders the application not-found page
  • five real catalog selections persist after navigating to Settings and back
  • a sixth distinct selection evicts the oldest entry
  • selecting an existing item promotes it without increasing the count

Validation

  • Release build: 0 warnings, 0 errors
  • Release tests: 225 passed
  • CSharpier check passed
  • all 52 adversarial documentation-integrity scenarios passed
  • Markdown lint passed for changed docs
  • all 7 locale JSON files parsed successfully
  • final focused correctness review: no findings

Closes #20

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 32 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d329d439-56e0-44cf-ab3b-603d9df7b6eb

📥 Commits

Reviewing files that changed from the base of the PR and between 711d97e and c8538f7.

📒 Files selected for processing (2)
  • src/App/Scan/ItemQueue.cs
  • tests/RatScanner.Tests/PresentationServicesTests.cs
📝 Walkthrough

Walkthrough

The dedicated History page, navigation entry, styles, and localization keys are removed. Recent scans now use a singleton service fed by synchronized queue events, retain five deduplicated results, and update the Scan page through change notifications. Tests and documentation reflect the revised workflow.

Changes

Recent scans workflow

Layer / File(s) Summary
Queue-driven recent scan storage
src/App/Scan/ItemQueue.cs, src/App/Presentation/RecentScansService.cs
ItemQueue emits synchronized enqueue batches, while RecentScansService records non-seed results, moves duplicates to the front, and caps storage at five items.
Scan page and navigation integration
src/App/Pages/App/Index.razor, src/App/View/BlazorUI.xaml.cs, src/App/Shared/AppLayout.razor, src/App/Pages/App/History.razor, src/App/Pages/App/History.razor.css, src/App/i18n/*.json
The Scan page consumes the singleton recent-scans service; the History route, sidebar entry, stylesheet, and history translations are removed.
Behavior validation and project documentation
tests/RatScanner.Tests/PresentationServicesTests.cs, docs/agent-context/*.md
Tests cover batch delivery, concurrent enqueues, deduplication, and the five-item cap; documentation describes the updated service ownership, workflow, breakpoint coverage, and smoke-test navigation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ItemQueue
  participant RecentScansService
  participant ScanPage
  ItemQueue->>RecentScansService: Publish enqueued scan batch
  RecentScansService->>RecentScansService: Deduplicate and retain five results
  RecentScansService->>ScanPage: Raise Changed
  ScanPage->>ScanPage: Refresh recent scans
Loading

Possibly related PRs

Suggested labels: size:XXL

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: removing the dedicated History page.
Description check ✅ Passed The description is directly about the same changeset and its validation.
Linked Issues check ✅ Passed The PR removes History, keeps Recent scans bounded and deduplicated, updates navigation/localization, and adds relevant tests.
Out of Scope Changes check ✅ Passed The code changes align with the stated goal and do not show unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/remove-history-page

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files label Jul 29, 2026
@codeant-ai

codeant-ai Bot commented Jul 29, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 84f40574
Scan Time: 2026-07-29 15:09:21 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED Rating S: No issues

View Full Results

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found and verified against the latest diff

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/App/Presentation/RecentScansService.cs">

<violation number="1" location="src/App/Presentation/RecentScansService.cs:44">
P2: Clicking an existing recent item leaves its position unchanged, so the promised promote-on-reselect behavior is missing: `SelectRecent` cannot call this now-private `Record` and only changes the displayed result. Exposing a promotion operation or otherwise recording from `SelectRecent` would move the selected snapshot to the front without adding a duplicate.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

}

internal void Record(ScanResultViewModel result)
private void Record(ScanResultViewModel result)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Clicking an existing recent item leaves its position unchanged, so the promised promote-on-reselect behavior is missing: SelectRecent cannot call this now-private Record and only changes the displayed result. Exposing a promotion operation or otherwise recording from SelectRecent would move the selected snapshot to the front without adding a duplicate.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/App/Presentation/RecentScansService.cs, line 44:

<comment>Clicking an existing recent item leaves its position unchanged, so the promised promote-on-reselect behavior is missing: `SelectRecent` cannot call this now-private `Record` and only changes the displayed result. Exposing a promotion operation or otherwise recording from `SelectRecent` would move the selected snapshot to the front without adding a duplicate.</comment>

<file context>
@@ -21,37 +23,36 @@ internal IReadOnlyList<ScanResultViewModel> Items
     }
 
-    internal void Record(ScanResultViewModel result)
+    private void Record(ScanResultViewModel result)
     {
         lock (_sync)
</file context>

Comment thread src/App/Scan/ItemQueue.cs Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/App/Scan/ItemQueue.cs">

<violation number="1" location="src/App/Scan/ItemQueue.cs:61">
P2: A delayed notification can observe mutations to the caller-owned `items` list, so Recent scans may omit or include the wrong entries when `EnqueueRange` overlaps another notification drain. Copy the batch before queueing the notification to preserve the exact enqueue snapshot.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread src/App/Scan/ItemQueue.cs
lock (enqueueSync)
{
items.ForEach(queue.Enqueue);
pendingNotifications.Enqueue(items);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: A delayed notification can observe mutations to the caller-owned items list, so Recent scans may omit or include the wrong entries when EnqueueRange overlaps another notification drain. Copy the batch before queueing the notification to preserve the exact enqueue snapshot.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/App/Scan/ItemQueue.cs, line 61:

<comment>A delayed notification can observe mutations to the caller-owned `items` list, so Recent scans may omit or include the wrong entries when `EnqueueRange` overlaps another notification drain. Copy the batch before queueing the notification to preserve the exact enqueue snapshot.</comment>

<file context>
@@ -36,23 +38,64 @@ internal bool PruneExpired(long now)
         {
             items.ForEach(queue.Enqueue);
-            ItemsEnqueued?.Invoke(items);
+            pendingNotifications.Enqueue(items);
+            shouldDrain = !isDrainingNotifications;
+            isDrainingNotifications = true;
</file context>
Suggested change
pendingNotifications.Enqueue(items);
pendingNotifications.Enqueue(items.ToArray());

@DysektAI DysektAI self-assigned this Jul 30, 2026
@DysektAI
DysektAI merged commit 6b1a5c9 into master Jul 30, 2026
10 checks passed
@DysektAI
DysektAI deleted the fix/remove-history-page branch July 30, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate removing or simplifying the session History page

1 participant