Skip to content

fix(security): remove client-side UploadThing credentials - #300

Merged
bobtista merged 3 commits into
developmentfrom
fix/disable-uploadthing-uploads
Jul 29, 2026
Merged

fix(security): remove client-side UploadThing credentials#300
bobtista merged 3 commits into
developmentfrom
fix/disable-uploadthing-uploads

Conversation

@bobtista

@bobtista bobtista commented Jul 27, 2026

Copy link
Copy Markdown

Summary

Remove the legacy UploadThing credential flow and disable authenticated uploads and deletion. Existing public-link imports remain available.

Changes

  • Remove CI credential injection and client decoding.
  • Fail closed and disable map/replay upload controls.
  • Make history removal local-only.
  • Add regression tests and update developer documentation.

Testing

  • git diff --check origin/development
  • Workflow YAML and modified AXAML parsing
  • Documentation build reaches an unrelated existing error in docs/features/manifest.md:497
  • .NET unavailable locally; CI must validate Windows/Linux builds and tests

Risks and rollback

Cloud upload and deletion remain unavailable until secure authorization is implemented. Public-link imports are unaffected.

Related issues

Closes #298

Related: #233, #238

Greptile Summary

This PR removes client-side UploadThing credentials and disables authenticated cloud operations.

  • Removes build-time credential injection and token-decoding constants.
  • Makes UploadThing upload and deletion methods fail closed without network requests.
  • Disables map and replay upload controls while preserving public-link imports.
  • Changes history removal to local-only and migrates legacy pending-deletion records.
  • Adds regression tests and updates developer documentation.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the legacy pending-deletion property is restored for deserialization, filtered during cold-cache loading, and removed from persisted history on successful migration.

Important Files Changed

Filename Overview
GenHub/GenHub/Features/Tools/Services/UploadHistoryService.cs Converts deletion to local-only behavior and correctly filters and persists legacy pending-deletion records during migration.
GenHub/GenHub.Core/Models/Tools/UploadRecord.cs Retains the legacy pending-deletion field solely for deserializing and migrating existing history files.
GenHub/GenHub/Features/Tools/Services/UploadThingService.cs Replaces credential-bearing network operations with explicit fail-closed upload and deletion responses.
GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs Covers local history removal, clearing, preservation of unrelated records, and migration of pending-deletion records.
GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml Disables map uploads and explains that cloud uploads are temporarily unavailable.
GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml Disables replay uploads and explains that cloud uploads are temporarily unavailable.

Reviews (3): Last reviewed commit: "test(upload-history): cover removal edge..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Cloud UploadThing credential injection and client-side upload/delete flows were removed. Upload controls are disabled, upload history changes are local-only, public-link imports remain supported, and tests and documentation describe the fail-closed behavior.

Changes

UploadThing security shutdown

Layer / File(s) Summary
Credential pipeline and contracts
.github/workflows/*, GenHub/GenHub.Core/Constants/*, docs/dev/*
CI token injection, client-side credential constants, obsolete messages, and active UploadThing documentation were removed or updated.
Disabled UploadThing service
GenHub/GenHub/Features/Tools/Services/UploadThingService.cs, GenHub/GenHub.Tests/.../UploadThingServiceTests.cs
Upload and delete now log warnings and return null or false without network requests; tests verify both outcomes.
Local-only upload history
GenHub/GenHub/Features/Tools/Services/UploadHistoryService.cs, GenHub/GenHub.Core/..., GenHub/GenHub.Tests/.../UploadHistoryServiceTests.cs
Pending deletion and remote deletion were removed; history removal and clearing now persist local changes only, with migration and persistence tests.
Disabled UI actions and notifications
GenHub/GenHub/Features/Tools/MapManager/*, GenHub/GenHub/Features/Tools/ReplayManager/*
Map and replay cloud-upload buttons are disabled, and notifications state that hosted files are not deleted.

Estimated code review effort: 4 (Complex) | ~45 minutes

Poem

I’m a rabbit who guards every secret byte,
No cloud upload hops into flight tonight.
Local history clears with a soft little thump,
Public links remain for a curious jump.
Tests watch the gates, and the docs say why—
Safe little paws beneath the sky.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy #298 by removing credential injection and client decoding, disabling upload/delete, keeping public-link imports, and adding tests/docs.
Out of Scope Changes check ✅ Passed All code, tests, and docs changes are tied to the UploadThing credential removal and related behavior updates.
Docstring Coverage ✅ Passed Docstring coverage is 66.67% which is sufficient. The required threshold is 50.00%.
Title check ✅ Passed The title follows conventional commit format and accurately describes the client-side UploadThing credential removal.
Description check ✅ Passed The description is clearly related to the changeset and summarizes the upload-disable and history updates.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/disable-uploadthing-uploads

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Comment thread GenHub/GenHub/Features/Tools/Services/UploadHistoryService.cs

/// <summary>
/// Removes a history item.
/// Removes an item from local history without deleting the hosted file.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Missing parameter validation

The RemoveHistoryItemAsync method accepts a string url parameter but doesn't validate that the URL is not null or empty. This could cause issues if called with invalid input.

Suggested change
/// Removes an item from local history without deleting the hosted file.
Task RemoveHistoryItemAsync(string url);

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.

Keeping this unchanged. The parameter is non-nullable, and the implementation’s equality check safely treats null or empty input as a no-op. The suggested interface change is identical and adds no runtime validation.

<StackPanel Orientation="Horizontal" Spacing="0">
<Button Command="{Binding UploadAndShareCommand}"
Classes="Primary" IsEnabled="{Binding SelectedMaps.Count}"
Classes="Primary" IsEnabled="False"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: Consider binding IsEnabled to a property instead of hardcoded value

Hardcoding IsEnabled="False" bypasses MVVM command-binding patterns. Consider binding to a ViewModel property like IsUploadEnabled so the state can be managed centrally and the button can be re-enabled programmatically when short-lived credentials are implemented.

Suggested change
Classes="Primary" IsEnabled="False"
Classes="Primary" IsEnabled="{Binding IsUploadEnabled}"

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.

Keeping the hardcoded disabled state intentionally. This is a fail-closed security switch; re-enabling uploads should require an explicit code change alongside the future authorization implementation, rather than a mutable ViewModel property.

<StackPanel Orientation="Horizontal" Spacing="0">
<Button Command="{Binding UploadAndShareCommand}"
Classes="Primary" IsEnabled="{Binding SelectedReplays.Count}"
Classes="Primary" IsEnabled="False"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: Consider binding IsEnabled to a property instead of hardcoded value

Hardcoding IsEnabled="False" bypasses MVVM command-binding patterns. Consider binding to a ViewModel property like IsUploadEnabled so the state can be managed centrally and the button can be re-enabled programmatically when short-lived credentials are implemented.

Suggested change
Classes="Primary" IsEnabled="False"
Classes="Primary" IsEnabled="{Binding IsUploadEnabled}"

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.

Keeping the hardcoded disabled state intentionally. This is a fail-closed security switch; re-enabling uploads should require an explicit code change alongside the future authorization implementation, rather than a mutable ViewModel property.

@kilo-code-bot

kilo-code-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs - Added comprehensive test coverage
Resolved Issues (click to expand)

The following issue from the previous review has been resolved in this commit:

  • SUGGESTION: Add coverage for partial removal and no-op edge cases (UploadHistoryServiceTests.cs:68) - Added three new test methods: RemoveHistoryItemAsync_WhenOtherItemsExist_PreservesOtherRecords, RemoveHistoryItemAsync_WhenUrlDoesNotMatch_PreservesHistory, and ClearHistoryAsync_WhenHistoryIsEmpty_RemainsEmpty.
Incremental Review Changes

This incremental review covers changes since commit 93aada2.

Test Coverage Improvements

Added three new test methods to UploadHistoryServiceTests.cs that address the previous suggestion for partial removal and no-op edge case coverage:

  1. Partial removal test - Verifies that removing one URL preserves other unrelated history entries
  2. Non-matching URL test - Ensures that removing a non-existent URL leaves history unchanged
  3. Empty history test - Confirms that clearing an empty history completes without errors

All new tests follow existing patterns, use proper async/await, and provide comprehensive coverage of edge cases.

Security Assessment

Overall: ✅ Good security improvements with migration fix

This PR effectively removes the reversible XOR obfuscation of UploadThing credentials from the build pipeline and desktop binaries. The fail-closed approach for UploadThingService is appropriate. The addition of comprehensive regression tests is excellent.

Migration Fix: The pending deletion records issue has been properly resolved. Legacy isPendingDeletion records are now filtered out during migration and the cleaned history is persisted to disk, preventing old records from reappearing.

Note: Repository owners should revoke and rotate the exposed UploadThing token as mentioned in the documentation.

Positive Observations

  • Comprehensive removal of credential injection pipeline
  • Fail-closed service implementation pattern
  • Good test coverage for disabled functionality
  • Clear documentation of security status
  • Appropriate fail-closed UI behavior
  • Well-documented requirements for re-enabling uploads
  • Proper migration logic for legacy pending deletion records
  • Thread-safe migration implementation with file locking
  • Backward compatible migration using JsonIgnore attribute
  • Excellent regression test coverage for edge cases
Previous Review Summaries (2 snapshots, latest commit 93aada2)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 93aada2)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
GenHub/GenHub.Core/Interfaces/Common/IUploadHistoryService.cs 45 Missing parameter validation for URL parameter

SUGGESTION

File Line Issue
GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs 68 Add coverage for partial removal and no-op edge cases
Resolved Issues (click to expand)

The following issues from the previous review have been resolved in this commit:

  • CRITICAL: Pending records reappear as uploads (UploadHistoryService.cs:106) - Migration logic now properly filters out legacy IsPendingDeletion records and saves cleaned history to disk.
  • SUGGESTION: Hardcoded IsEnabled should use MVVM binding pattern (MapManagerView.axaml:192) - Obsolete due to removal of "(max 10MB per file)" text.
  • SUGGESTION: Hardcoded IsEnabled should use MVVM binding pattern (ReplayManagerView.axaml:170) - Obsolete due to removal of "(max 10MB per file)" text.
Files Reviewed (18 files)
  • .github/scripts/inject-token.ps1 - DELETED (security improvement)
  • .github/workflows/ci.yml - Removed credential injection
  • .github/workflows/release.yml - Removed credential injection
  • GenHub/GenHub.Core/Constants/ApiConstants.cs - Removed UploadThing constants
  • GenHub/GenHub.Core/Constants/ErrorMessages.cs - Removed UploadThing errors
  • GenHub/GenHub.Core/Constants/LogMessages.cs - Removed UploadThing logs
  • GenHub/GenHub.Core/Interfaces/Common/IUploadHistoryService.cs - 1 issue
  • GenHub/GenHub.Core/Models/Tools/UploadRecord.cs - Added migration support for IsPendingDeletion
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs - 1 issue + good migration test
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadThingServiceTests.cs - Good fail-closed tests
  • GenHub/GenHub/Features/Tools/MapManager/ViewModels/MapManagerViewModel.cs - Updated user messages
  • GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml - Removed stale UI text
  • GenHub/GenHub/Features/Tools/ReplayManager/ViewModels/ReplayManagerViewModel.cs - Updated user messages
  • GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml - Removed stale UI text
  • GenHub/GenHub/Features/Tools/Services/UploadHistoryService.cs - Added proper migration logic
  • GenHub/GenHub/Features/Tools/Services/UploadThingService.cs - Fail-closed implementation
  • docs/dev/constants.md - Updated documentation
  • docs/dev/uploading-api.md - Updated documentation

Security Assessment

Overall: ✅ Good security improvements with migration fix

This PR effectively removes the reversible XOR obfuscation of UploadThing credentials from the build pipeline and desktop binaries. The fail-closed approach for UploadThingService is appropriate. The addition of regression tests is excellent.

Migration Fix: The pending deletion records issue has been properly resolved. Legacy isPendingDeletion records are now filtered out during migration and the cleaned history is persisted to disk, preventing old records from reappearing.

Note: Repository owners should revoke and rotate the exposed UploadThing token as mentioned in the documentation.

Positive Observations

  • Comprehensive removal of credential injection pipeline
  • Fail-closed service implementation pattern
  • Good test coverage for disabled functionality
  • Clear documentation of security status
  • Appropriate fail-closed UI behavior
  • Well-documented requirements for re-enabling uploads
  • Proper migration logic for legacy pending deletion records
  • Thread-safe migration implementation with file locking
  • Backward compatible migration using JsonIgnore attribute

Fix these issues in Kilo Cloud

Previous review (commit c69a6cc)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
GenHub/GenHub.Core/Interfaces/Common/IUploadHistoryService.cs 45 Missing parameter validation for URL parameter

SUGGESTION

File Line Issue
GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml 192 Hardcoded IsEnabled should use MVVM binding pattern
GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml 170 Hardcoded IsEnabled should use MVVM binding pattern
Files Reviewed (18 files)
  • .github/scripts/inject-token.ps1 - DELETED (security improvement)
  • .github/workflows/ci.yml - Removed credential injection
  • .github/workflows/release.yml - Removed credential injection
  • GenHub/GenHub.Core/Constants/ApiConstants.cs - Removed UploadThing constants
  • GenHub/GenHub.Core/Constants/ErrorMessages.cs - Removed UploadThing errors
  • GenHub/GenHub.Core/Constants/LogMessages.cs - Removed UploadThing logs
  • GenHub/GenHub.Core/Interfaces/Common/IUploadHistoryService.cs - 1 issue
  • GenHub/GenHub.Core/Models/Tools/UploadRecord.cs - Removed IsPendingDeletion property
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs - NEW (good tests)
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadThingServiceTests.cs - NEW (good tests)
  • GenHub/GenHub/Features/Tools/MapManager/ViewModels/MapManagerViewModel.cs - Updated user messages
  • GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml - 1 issue
  • GenHub/GenHub/Features/Tools/ReplayManager/ViewModels/ReplayManagerViewModel.cs - Updated user messages
  • GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml - 1 issue
  • GenHub/GenHub/Features/Tools/Services/UploadHistoryService.cs - Simplified to local-only
  • GenHub/GenHub/Features/Tools/Services/UploadThingService.cs - Fail-closed implementation
  • docs/dev/constants.md - Updated documentation
  • docs/dev/uploading-api.md - Updated documentation

Security Assessment

Overall: ✅ Good security improvements

This PR effectively removes the reversible XOR obfuscation of UploadThing credentials from the build pipeline and desktop binaries. The fail-closed approach for UploadThingService is appropriate. The addition of regression tests is excellent.

Note: Repository owners should revoke and rotate the exposed UploadThing token as mentioned in the documentation.

Positive Observations

  • Comprehensive removal of credential injection pipeline
  • Fail-closed service implementation pattern
  • Good test coverage for disabled functionality
  • Clear documentation of security status
  • Appropriate fail-closed UI behavior
  • Well-documented requirements for re-enabling uploads

Reply with @kilocode-bot fix it to have Kilo Code address these issues.


Reviewed by glm-4.7 · Input: 46K · Output: 3.1K · Cached: 199K

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml (2)

190-207: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Stale "(max 10MB per file)" hint left next to permanently disabled Upload buttons. Both views correctly hard-disable the Upload button and update its tooltip to explain the credential-shutdown, but the adjacent size-limit caption was left untouched, so it now advertises a limit for a feature users can't use at all.

  • GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml#L190-L207: remove the "(max 10MB per file)" TextBlock at Line 207 (or bind its IsVisible to false/an "uploads enabled" flag) since the Upload button is now permanently disabled.
  • GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml#L168-L185: remove the "(max 10MB per file)" TextBlock at Line 185 (or bind its IsVisible similarly) for the same reason.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml` around
lines 190 - 207, Remove or hide the stale “(max 10MB per file)” caption beside
the disabled Upload controls in MapManagerView.axaml (lines 190-207) and
ReplayManagerView.axaml (lines 168-185), using the existing uploads-enabled
state if binding visibility instead of removing the TextBlock.

190-199: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Disabling looks correct; stale size hint next to disabled button.

The permanent IsEnabled="False" and updated tooltip correctly reflect that cloud uploads are disabled. However, the adjacent "(max 10MB per file)" hint at Line 207 still implies an active upload limit for a control that can never be used, which is confusing. This shares one root cause with the identical text in ReplayManagerView.axaml; see the consolidated comment.

Also applies to: 207-207

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml` around
lines 190 - 199, The disabled upload controls should not display the stale “(max
10MB per file)” hint. Remove that hint from the upload section in MapManagerView
and the corresponding upload section in ReplayManagerView, while preserving the
disabled buttons and their existing tooltips.
GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml (1)

168-177: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Disabling looks correct; stale size hint next to disabled button.

Same pattern as MapManagerView.axaml: the disable + tooltip change is correct, but "(max 10MB per file)" at Line 185 is now stale next to a permanently disabled Upload button. See the consolidated comment.

Also applies to: 185-185

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml`
around lines 168 - 177, Remove the stale “(max 10MB per file)” size hint
adjacent to the disabled Upload button in the ReplayManagerView upload controls.
Keep the existing UploadAndShareCommand button, disabled state, and tooltip
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs`:
- Around line 42-68: Extend the UploadHistoryService tests around
RemoveHistoryItemAsync and ClearHistoryAsync to cover partial removal and no-op
behavior. Add a case proving removing one URL preserves unrelated history
entries, plus cases confirming removing a non-matching URL and clearing an empty
history complete without throwing and leave history empty.

In `@GenHub/GenHub/Features/Tools/Services/UploadThingService.cs`:
- Around line 19-37: Move the two disabled-state warning strings used by
UploadFileAsync and DeleteFileAsync into named constants in LogMessages, then
update both logger.LogWarning calls to reference those constants. Preserve the
existing warning text and behavior while following the established LogMessages
convention.

---

Outside diff comments:
In `@GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml`:
- Around line 190-207: Remove or hide the stale “(max 10MB per file)” caption
beside the disabled Upload controls in MapManagerView.axaml (lines 190-207) and
ReplayManagerView.axaml (lines 168-185), using the existing uploads-enabled
state if binding visibility instead of removing the TextBlock.
- Around line 190-199: The disabled upload controls should not display the stale
“(max 10MB per file)” hint. Remove that hint from the upload section in
MapManagerView and the corresponding upload section in ReplayManagerView, while
preserving the disabled buttons and their existing tooltips.

In `@GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml`:
- Around line 168-177: Remove the stale “(max 10MB per file)” size hint adjacent
to the disabled Upload button in the ReplayManagerView upload controls. Keep the
existing UploadAndShareCommand button, disabled state, and tooltip unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8c45dee5-4809-44f8-a149-21804c1932bd

📥 Commits

Reviewing files that changed from the base of the PR and between 5ba2a51 and c69a6cc.

📒 Files selected for processing (18)
  • .github/scripts/inject-token.ps1
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • GenHub/GenHub.Core/Constants/ApiConstants.cs
  • GenHub/GenHub.Core/Constants/ErrorMessages.cs
  • GenHub/GenHub.Core/Constants/LogMessages.cs
  • GenHub/GenHub.Core/Interfaces/Common/IUploadHistoryService.cs
  • GenHub/GenHub.Core/Models/Tools/UploadRecord.cs
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadThingServiceTests.cs
  • GenHub/GenHub/Features/Tools/MapManager/ViewModels/MapManagerViewModel.cs
  • GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml
  • GenHub/GenHub/Features/Tools/ReplayManager/ViewModels/ReplayManagerViewModel.cs
  • GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml
  • GenHub/GenHub/Features/Tools/Services/UploadHistoryService.cs
  • GenHub/GenHub/Features/Tools/Services/UploadThingService.cs
  • docs/dev/constants.md
  • docs/dev/uploading-api.md
💤 Files with no reviewable changes (5)
  • GenHub/GenHub.Core/Constants/LogMessages.cs
  • GenHub/GenHub.Core/Constants/ErrorMessages.cs
  • .github/scripts/inject-token.ps1
  • .github/workflows/ci.yml
  • .github/workflows/release.yml

Comment thread GenHub/GenHub/Features/Tools/Services/UploadThingService.cs
@bobtista

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@bobtista

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

♻️ Duplicate comments (1)
GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs (1)

42-68: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Still missing partial-removal and no-op test coverage.

Only "remove the only item" and "clear all items" are covered. A prior review already asked for a case where removing one URL leaves other entries intact, plus no-op cases (removing a non-matching URL / clearing an empty history without throwing).

✅ Example additional test
[Fact]
public async Task RemoveHistoryItemAsync_WhenOtherItemsExist_LeavesThemIntact()
{
    var service = CreateService();
    service.RecordUpload(1024, "https://utfs.io/f/first", "first.zip");
    service.RecordUpload(2048, "https://utfs.io/f/second", "second.zip");

    await service.RemoveHistoryItemAsync("https://utfs.io/f/first");

    var reloadedService = CreateService();
    var remaining = await reloadedService.GetUploadHistoryAsync();
    Assert.Single(remaining);
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs`
around lines 42 - 68, Add tests alongside
RemoveHistoryItemAsync_WhenItemExists_RemovesLocalRecord and
ClearHistoryAsync_WhenItemsExist_RemovesAllLocalRecords covering partial
removal, removal of a non-matching URL, and clearing an empty history. Verify
partial removal preserves the other record, while both no-op cases complete
without throwing and leave history empty or unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In
`@GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs`:
- Around line 42-68: Add tests alongside
RemoveHistoryItemAsync_WhenItemExists_RemovesLocalRecord and
ClearHistoryAsync_WhenItemsExist_RemovesAllLocalRecords covering partial
removal, removal of a non-matching URL, and clearing an empty history. Verify
partial removal preserves the other record, while both no-op cases complete
without throwing and leave history empty or unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 113f72bd-b217-4664-9b5a-434a5c9c0415

📥 Commits

Reviewing files that changed from the base of the PR and between c69a6cc and 93aada2.

📒 Files selected for processing (5)
  • GenHub/GenHub.Core/Models/Tools/UploadRecord.cs
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Tools/Services/UploadHistoryServiceTests.cs
  • GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml
  • GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml
  • GenHub/GenHub/Features/Tools/Services/UploadHistoryService.cs
💤 Files with no reviewable changes (2)
  • GenHub/GenHub/Features/Tools/MapManager/Views/MapManagerView.axaml
  • GenHub/GenHub/Features/Tools/ReplayManager/Views/ReplayManagerView.axaml

@bobtista
bobtista merged commit b3280ad into development Jul 29, 2026
7 checks passed
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.

1 participant