Skip to content

Conversation

@utkarshdalal
Copy link
Owner

@utkarshdalal utkarshdalal commented Feb 1, 2026

…), add nolrz + deck_emu to TU_DEBUG when using a gen8 driver, reduced game compatibility cache to leverage new materialised table


Summary by cubic

Fixed gen8 graphics stability and Windows save path handling; also reduced game compatibility cache refresh time for fresher data. Updated Turnip 26 R8 driver bundle.

  • Bug Fixes

    • Normalize Windows backslashes in save path templates to the OS separator (SaveFilePattern, UserFileInfo); tests updated.
    • Auto-add TU_DEBUG flags deck_emu and nolrz when the graphics driver version contains "gen8".
    • Apply WRAPPER_NO_PATCH_OPCONSTCOMP for DXVK 1.11.1-sarek in the correct extraction path.
  • Performance

    • Reduced GameCompatibilityCache TTL to 6 hours to align with the new materialized table.

Written for commit 37083ab. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Added automatic graphics driver quick-configuration for gen8 GPUs with enhanced environment variable setup.
  • Bug Fixes

    • Fixed cross-platform Windows path separator handling.
    • Enhanced DXVK wrapper compatibility for specific versions with improved patch operation handling.
  • Performance

    • Optimized game compatibility cache retention to refresh more frequently.

✏️ Tip: You can customize this high-level summary in your review settings.

…), add nolrz + deck_emu to TU_DEBUG when using a gen8 driver, reduced game compatibility cache to leverage new materialised table
@coderabbitai
Copy link

coderabbitai bot commented Feb 1, 2026

📝 Walkthrough

Walkthrough

This PR implements platform-aware path separator normalization across file pattern handling, adjusts game compatibility cache expiration from 3 days to 6 hours, enhances graphics driver environment configuration for gen8 drivers, and adds special handling for specific DXVK wrapper versions alongside test data updates.

Changes

Cohort / File(s) Summary
Path Separator Normalization
app/src/main/java/app/gamenative/data/SaveFilePattern.kt, app/src/main/java/app/gamenative/data/UserFileInfo.kt
Adds platform-aware path separator normalization by replacing backslashes with File.separator in the substitutedPath getter computation.
Graphics Driver Configuration
app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt
Adds gen8 graphics driver detection to append deck_emu and nolrz flags to TU_DEBUG environment variable; duplicates DXVK wrapper version patch logic to disable SPIR-V patch for dxwrapper version "1.11.1-sarek".
Cache Expiration Tuning
app/src/main/java/app/gamenative/utils/GameCompatibilityCache.kt
Reduces CACHE_TTL_MS from 3 days to 6 hours for more aggressive in-memory cache expiration.
Test Data Updates
app/src/test/java/app/gamenative/service/SteamAutoCloudTest.kt
Updates Windows path test data to properly escape backslashes in SaveFilePattern.path test strings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #142: Modifies SaveFilePattern.kt and UserFileInfo.kt substitutedPath logic with placeholder substitution complementing the path-separator normalization.
  • PR #108: Modifies XServerScreen.kt for graphics driver environment setup and dxwrapper version-specific handling with overlapping implementation patterns.
  • PR #445: Adds "deck_emu" as an allowed TU_DEBUG value, directly complementing the gen8 driver configuration enhancement.

Poem

🐰 Whiskers twitch with glee,
Paths now skip cross the OS tree,
Gen8 drivers gleam so bright,
Cache expires with swifter flight,
File separators hop in sight! 🌿

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title partially addresses multiple changes in the PR but truncates mid-phrase and doesn't capture all key modifications like cache TTL reduction and test path escaping.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 0.7.1-touchups

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

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

⚠️ Outside diff range comments (2)
app/src/main/java/app/gamenative/utils/GameCompatibilityCache.kt (1)

10-15: ⚠️ Potential issue | 🟡 Minor

Update the TTL docstring to match the new 6‑hour cache.

The header still states “7‑day TTL,” which no longer matches CACHE_TTL_MS.

🛠️ Proposed fix
- * Persistent cache for game compatibility responses with 7-day TTL.
+ * Persistent cache for game compatibility responses with 6-hour TTL.
app/src/test/java/app/gamenative/service/SteamAutoCloudTest.kt (1)

233-257: ⚠️ Potential issue | 🟡 Minor

Avoid swallowing cleanup exceptions silently.

Even in tests, a lightweight log helps diagnose flaky cleanup failures.

🛠️ Proposed fix
-        } catch (e: Exception) {
-            // Ignore cleanup errors - files might be locked, but Robolectric will handle it
-        }
+        } catch (e: Exception) {
+            System.err.println("ImageFs cleanup failed: ${e.message}")
+        }
@@
-        } catch (e: Exception) {
-            // Ignore cleanup errors
-        }
+        } catch (e: Exception) {
+            System.err.println("Temp dir cleanup failed: ${e.message}")
+        }

Copy link
Contributor

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

Choose a reason for hiding this comment

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

2 issues found across 6 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="app/src/main/java/app/gamenative/utils/GameCompatibilityCache.kt">

<violation number="1" location="app/src/main/java/app/gamenative/utils/GameCompatibilityCache.kt:15">
P3: Class-level KDoc still claims a 7-day TTL, but the cache TTL was changed to 6 hours. Update the KDoc so documentation matches the new expiration behavior.</violation>
</file>

<file name="app/src/test/java/app/gamenative/service/SteamAutoCloudTest.kt">

<violation number="1" location="app/src/test/java/app/gamenative/service/SteamAutoCloudTest.kt:138">
P2: This pattern now uses backslashes while the other patterns use forward slashes, so the three patterns no longer share the same prefix on Unix-based test runtimes. That undermines the test’s intent to validate grouping of multiple patterns under a single prefix. Keep the separators consistent across patterns (or normalize with `File.separator`) so they resolve to the same prefix.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

SaveFilePattern(
root = PathType.WinMyDocuments,
path = "My Games/TestGame/Steam/76561198025127569",
path = "My Games\\TestGame\\Steam\\76561198025127569",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 1, 2026

Choose a reason for hiding this comment

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

P2: This pattern now uses backslashes while the other patterns use forward slashes, so the three patterns no longer share the same prefix on Unix-based test runtimes. That undermines the test’s intent to validate grouping of multiple patterns under a single prefix. Keep the separators consistent across patterns (or normalize with File.separator) so they resolve to the same prefix.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/src/test/java/app/gamenative/service/SteamAutoCloudTest.kt, line 138:

<comment>This pattern now uses backslashes while the other patterns use forward slashes, so the three patterns no longer share the same prefix on Unix-based test runtimes. That undermines the test’s intent to validate grouping of multiple patterns under a single prefix. Keep the separators consistent across patterns (or normalize with `File.separator`) so they resolve to the same prefix.</comment>

<file context>
@@ -135,7 +135,7 @@ class SteamAutoCloudTest {
             SaveFilePattern(
                 root = PathType.WinMyDocuments,
-                path = "My Games/TestGame/Steam/76561198025127569",
+                path = "My Games\\TestGame\\Steam\\76561198025127569",
                 pattern = "SystemData_0.sav",
             ),
</file context>
Suggested change
path = "My Games\\TestGame\\Steam\\76561198025127569",
path = "My Games/TestGame/Steam/76561198025127569",
Fix with Cubic

Copy link
Owner Author

Choose a reason for hiding this comment

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

That's the point of the test bro, it should work with forward slashes

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the feedback! I've saved this as a new learning to improve future reviews.

*/
object GameCompatibilityCache {
private const val CACHE_TTL_MS = 3 * 24 * 60 * 60 * 1000L // 1 day
private const val CACHE_TTL_MS = 6 * 60 * 60 * 1000L // 6 hours
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 1, 2026

Choose a reason for hiding this comment

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

P3: Class-level KDoc still claims a 7-day TTL, but the cache TTL was changed to 6 hours. Update the KDoc so documentation matches the new expiration behavior.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/src/main/java/app/gamenative/utils/GameCompatibilityCache.kt, line 15:

<comment>Class-level KDoc still claims a 7-day TTL, but the cache TTL was changed to 6 hours. Update the KDoc so documentation matches the new expiration behavior.</comment>

<file context>
@@ -12,7 +12,7 @@ import timber.log.Timber
  */
 object GameCompatibilityCache {
-    private const val CACHE_TTL_MS = 3 * 24 * 60 * 60 * 1000L // 1 day
+    private const val CACHE_TTL_MS = 6 * 60 * 60 * 1000L // 6 hours
 
     private val inMemoryCache = mutableMapOf<String, GameCompatibilityService.GameCompatibilityResponse>()
</file context>
Fix with Cubic

@utkarshdalal utkarshdalal merged commit 0a1e040 into master Feb 1, 2026
3 checks passed
@utkarshdalal utkarshdalal deleted the 0.7.1-touchups branch February 1, 2026 15:31
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.

2 participants