Skip to content

gamefix: Added multifix support + added slay the spire 2 fix#1160

Open
unbelievableflavour wants to merge 1 commit intoutkarshdalal:masterfrom
unbelievableflavour:sts2-gamefix
Open

gamefix: Added multifix support + added slay the spire 2 fix#1160
unbelievableflavour wants to merge 1 commit intoutkarshdalal:masterfrom
unbelievableflavour:sts2-gamefix

Conversation

@unbelievableflavour
Copy link
Copy Markdown
Contributor

@unbelievableflavour unbelievableflavour commented Apr 9, 2026

Description

Added the launch arg fix as gamefix. So it works as a sensible default even when known config is not applied.

Recording

No recording. But verified in the discord and reddit multiple times.
https://discord.com/channels/1378308569287622737/1490412953260920905

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Added multi-fix support via KeyedCompositeGameFix. Slay the Spire 2 (STEAM_Fix_2868840) now forces Vulkan via launch arg and applies Wine env vars for ICU and .NET; registered in GameFixesRegistry.

Written for commit ef752a9. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Added a game fix for Steam game 2868840 that enables the Vulkan renderer and sets Wine environment variables.
    • Introduced composite game fixes to apply multiple fixes sequentially with aggregate success reporting.
  • Bug Fixes

    • Adjusted Steam fix ordering to ensure the intended fix is associated for duplicate Steam entries.
  • Tests

    • Added tests verifying composite fix execution order, success/failure behavior, and keyed properties.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ccaab184-0cbb-42a3-a1b8-d4c92611d4fb

📥 Commits

Reviewing files that changed from the base of the PR and between 02a3974 and ef752a9.

📒 Files selected for processing (4)
  • app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt
  • app/src/main/java/app/gamenative/gamefixes/STEAM_2868840.kt
  • app/src/main/java/app/gamenative/gamefixes/types/KeyedCompositeGameFix.kt
  • app/src/test/java/app/gamenative/gamefixes/types/KeyedCompositeGameFixTest.kt
✅ Files skipped from review due to trivial changes (1)
  • app/src/main/java/app/gamenative/gamefixes/STEAM_2868840.kt
🚧 Files skipped from review as they are similar to previous changes (3)
  • app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt
  • app/src/main/java/app/gamenative/gamefixes/types/KeyedCompositeGameFix.kt
  • app/src/test/java/app/gamenative/gamefixes/types/KeyedCompositeGameFixTest.kt

📝 Walkthrough

Walkthrough

Adds a composite game-fix implementation (KeyedCompositeGameFix/CompositeGameFix), a new Steam composite fix for game ID 2868840, updates registry ordering for Steam fixes, and adds tests validating ordered, non-short-circuiting application and keyed properties.

Changes

Cohort / File(s) Summary
Composite Fix Framework
app/src/main/java/app/gamenative/gamefixes/types/KeyedCompositeGameFix.kt
Adds CompositeGameFix that applies a list of GameFix instances in order and returns overall success only if all succeed; adds KeyedCompositeGameFix exposing gameSource and gameId and delegating to the composite.
Steam Composite Fix
app/src/main/java/app/gamenative/gamefixes/STEAM_2868840.kt
Adds exported STEAM_Fix_2868840: KeyedCompositeGameFix for Steam game ID 2868840, composing LaunchArgFix("--rendering-driver vulkan") and a WineEnvVarFix with several env var mappings.
Registry Ordering
app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt
Reorders Steam entries so STEAM_Fix_3373660 is placed after STEAM_Fix_2868840, affecting which keyed entry wins on duplicate (GameSource.STEAM, gameId) keys.
Tests
app/src/test/java/app/gamenative/gamefixes/types/KeyedCompositeGameFixTest.kt
Adds Robolectric tests with RecordingFix verifying: ordered invocation, non-short-circuit behavior when a fix fails, and correct gameSource/gameId exposure.

Sequence Diagram(s)

mermaid
sequenceDiagram
rect rgba(100,149,237,0.5)
participant Caller
end
rect rgba(60,179,113,0.5)
participant KeyedComposite
end
rect rgba(255,165,0,0.5)
participant SubFix1
end
rect rgba(255,99,71,0.5)
participant SubFix2
end
rect rgba(147,112,219,0.5)
participant Container
end

Caller->>KeyedComposite: apply(context, gameId, installPath, installPathWindows, container)
KeyedComposite->>SubFix1: apply(same args)
SubFix1-->>KeyedComposite: true/false
KeyedComposite->>SubFix2: apply(same args)
SubFix2-->>KeyedComposite: true/false
KeyedComposite-->>Caller: overall true if all true, else false

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • phobos665

Poem

🐇 I hop through code with fixes in tow,
Stacking tweaks in order so games can glow.
Vulkan whispers, Wine envs align,
Each fix runs in turn — a neat little line.
Hooray for smooth launches, one hop at a time!

🚥 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
Title check ✅ Passed The title accurately summarizes the two main changes: introducing multi-fix support and adding a Slay the Spire 2 gamefix.
Description check ✅ Passed The description covers the main change and includes all required checklist items, though the recording status statement conflicts with the checklist mark.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@unbelievableflavour unbelievableflavour changed the title Added slay the spire 2 launch arg fix gamefix: Added slay the spire 2 launch arg fix Apr 9, 2026
Copy link
Copy Markdown
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.

No issues found across 2 files

@unbelievableflavour unbelievableflavour force-pushed the sts2-gamefix branch 2 times, most recently from 81a3abb to 8bbaffa Compare April 9, 2026 18:53
@unbelievableflavour unbelievableflavour changed the title gamefix: Added slay the spire 2 launch arg fix feat + gamefix: Added slay the spire 2 launch arg fix Apr 9, 2026
@unbelievableflavour unbelievableflavour changed the title feat + gamefix: Added slay the spire 2 launch arg fix feat + gamefix: Added multifix support + added slay the spire 2 fix Apr 9, 2026
Copy link
Copy Markdown
Contributor

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/main/java/app/gamenative/gamefixes/types/KeyedCompositeGameFix.kt`:
- Around line 22-27: The loop over fixes in KeyedCompositeGameFix.kt currently
calls fix.apply(context, gameId, installPath, installPathWindows, container)
without guarding against exceptions so one thrown fix aborts the composite; wrap
each call to fix.apply in a try-catch that catches Throwable (or Exception),
logs the error (including which fix failed and contextual values like gameId)
and sets allSucceeded = false before continuing to the next fix, ensuring the
method still returns the aggregated allSucceeded result after the loop.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0b760ab5-75be-4760-89b3-5d73008d27f9

📥 Commits

Reviewing files that changed from the base of the PR and between 81a3abb and 8bbaffa.

📒 Files selected for processing (8)
  • app/src/main/java/app/gamenative/gamefixes/GOG_1453375253.kt
  • app/src/main/java/app/gamenative/gamefixes/GameFixesRegistry.kt
  • app/src/main/java/app/gamenative/gamefixes/STEAM_2868840.kt
  • app/src/main/java/app/gamenative/gamefixes/STEAM_413150.kt
  • app/src/main/java/app/gamenative/gamefixes/types/KeyedCompositeGameFix.kt
  • app/src/main/java/app/gamenative/gamefixes/types/WineEnvVarFix.kt
  • app/src/test/java/app/gamenative/gamefixes/types/KeyedCompositeGameFixTest.kt
  • app/src/test/java/app/gamenative/gamefixes/types/WineEnvVarFixTest.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/java/app/gamenative/gamefixes/STEAM_2868840.kt

@unbelievableflavour unbelievableflavour changed the title feat + gamefix: Added multifix support + added slay the spire 2 fix gamefix: Added multifix support + added slay the spire 2 fix Apr 10, 2026
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