launcher: add a game list refresh action #683

Manually merged
github merged 4 commits from gh-pr/683/head into gh-pr/683/base 2026-11-26 09:29:34 +00:00
Owner

@⁠c0sxm0s on GitHub · 2026-09-17 18:34 UTC · original
c0sxm0s:launcher-refresh-game-list → main · +104 −13 · 4 files · 4 commits · merged 2026-09-20 16:44 UTC

Add a toolbar refresh button and F5 shortcut to rescan game folders while preserving running games, selection, filtering, sorting, and pending comments.

Validation: launcher build and all 32 Qt interaction checks passed.

**@⁠c0sxm0s** on GitHub · 2026-09-17 18:34 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/683) `c0sxm0s:launcher-refresh-game-list` → `main` · +104 −13 · 4 files · 4 commits · merged 2026-09-20 16:44 UTC Add a toolbar refresh button and F5 shortcut to rescan game folders while preserving running games, selection, filtering, sorting, and pending comments. Validation: launcher build and all 32 Qt interaction checks passed.
Dropping new games into an already-configured game folder was only
picked up after restarting the launcher or re-saving the global
settings dialog. Add a refresh toolbar button, an F5 shortcut, and a
"Refresh game list" context-menu entry, all triggering a rescan of the
game folders.
Clearing cfgs_list destroys the running ConfigurationItem: the running
state is lost and the replacement items allow editing or deleting a
game whose process is still active. Skip the rescan while any item is
running (CodeRabbit review finding for the refresh action).
Share one refresh action across the toolbar, keyboard shortcut, and context menu. Retain running items during rescans, update their settings for the next launch, and preserve selection, filtering, and sort order.

Commit active inline editors before rebuilding rows to avoid losing comments or accessing destroyed configuration data. Tie editor callbacks to item lifetime and guard the context-menu item reference.

Validation: launcher build and startup check passed; 32 Qt interaction checks passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:29:31 +00:00
github manually merged commit 7b1ed7dac0 into gh-pr/683/base 2026-11-26 09:29:34 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-17 18:42 UTC · original · edited 2026-09-20 16:44 UTC

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 1c384c83-2336-4d33-b8c8-6369772c5cf6

📥 Commits

Reviewing files that changed from the base of the PR and between 376cbf63d7 and 9e827e683c.

📒 Files selected for processing (1)
  • src/launcher/src/configurationListWidget.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/launcher/src/configurationListWidget.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Adds a refresh button to the configuration toolbar and registers its icon resource. The button, QKeySequence::Refresh shortcut, and “Refresh game list” context-menu action invoke ScanGameDirectory. The scan now stops before clearing the game list when a listed game is running.

Priority: ⬇️ Low

Change: Feature

Merge Risk: ⚪ Minimal · up to 9e827

No concrete merge-blocking issue was identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly explains the refresh button, F5 shortcut, rescan behavior, state preservation, and validation results. It directly matches the changeset.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding a game list refresh action to the launcher.

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

**@⁠coderabbitai[bot]** on GitHub · 2026-09-17 18:42 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/683#issuecomment-5719476016) · edited 2026-09-20 16:44 UTC <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/683#gh-light-mode-only"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg" alt="Review Change Stack" width="202" height="32"></a><a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/683#gh-dark-mode-only"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg" alt="Review Change Stack" width="202" height="32"></a> <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary>ℹ️ Recent review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Path: .coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `1c384c83-2336-4d33-b8c8-6369772c5cf6` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 376cbf63d7adcf13ecbef6891cfcba2dd1dd9db3 and 9e827e683ca3fcf49cc554ab703b9b3e6ceb23d9. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `src/launcher/src/configurationListWidget.cpp` </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary> * src/launcher/src/configurationListWidget.cpp </details> **Included review availability:** Your plan provides up to 10 included reviews per hour; 9 remain after this review. </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough Adds a refresh button to the configuration toolbar and registers its icon resource. The button, `QKeySequence::Refresh` shortcut, and “Refresh game list” context-menu action invoke `ScanGameDirectory`. The scan now stops before clearing the game list when a listed game is running. </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬇️ Low <!-- change_assessment_commit:"9e827e683ca3fcf49cc554ab703b9b3e6ceb23d9" --> **Change:** Feature <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** _⚪ Minimal_ · up to `9e827` <!-- final_review_risk_coverage:{"sourceCommitId":"9e827e683ca3fcf49cc554ab703b9b3e6ceb23d9","coveredCommitId":"9e827e683ca3fcf49cc554ab703b9b3e6ceb23d9","kind":"reviewed"} --> No concrete merge-blocking issue was identified. <!-- final_review_risk_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 4 | ❌ 1</summary> ### ❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary>✅ Passed checks (4 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Description check | ✅ Passed | The description clearly explains the refresh button, F5 shortcut, rescan behavior, state preservation, and validation results. It directly matches the changeset. | | Title check | ✅ Passed | The title clearly and concisely identifies the main change: adding a game list refresh action to the launcher. | </details> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> --- <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-17 18:42 UTC · original · reviewed

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4aae5cde-fd76-47f6-b01c-7256ee8dfe70

📥 Commits

Reviewing files that changed from the base of the PR and between 104530eafc and 376cbf63d7.

⛔ Files ignored due to path filters (1)
  • src/launcher/icons/refresh.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • src/launcher/forms/configuration_list_widget.ui
  • src/launcher/resources.qrc
  • src/launcher/src/configurationListWidget.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-09-17 18:42 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/683#pullrequestreview-5239971123) · **reviewed** **Actionable comments posted: 1** --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Path: .coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `4aae5cde-fd76-47f6-b01c-7256ee8dfe70` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 104530eafcc4c5eb2e33959488ce7472e1484482 and 376cbf63d7adcf13ecbef6891cfcba2dd1dd9db3. </details> <details> <summary>⛔ Files ignored due to path filters (1)</summary> * `src/launcher/icons/refresh.svg` is excluded by `!**/*.svg` </details> <details> <summary>📒 Files selected for processing (3)</summary> * `src/launcher/forms/configuration_list_widget.ui` * `src/launcher/resources.qrc` * `src/launcher/src/configurationListWidget.cpp` </details> **Included review availability:** Your plan provides up to 10 included reviews per hour; 6 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-17 18:42 UTC · original · edited 2026-09-18 05:14 UTC
On src/launcher/src/configurationListWidget.cpp line 228 (outdated):

@@ -222,6 +224,8 @@ ConfigurationListWidget::ConfigurationListWidget(QWidget* parent)
 	m_ui->cfgs_list->setColumnWidth(GAME_STATUS_COLUMN, 150);
 	m_ui->cfgs_list->setColumnWidth(GAME_COMMENT_COLUMN, 240);
 
+	connect(m_ui->refresh_button, &QToolButton::clicked, this,
+	        &ConfigurationListWidget::ScanGameDirectory);

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '190,310p' src/launcher/src/configurationListWidget.cpp
sed -n '830,900p' src/launcher/src/configurationListWidget.cpp
rg -n -C 5 'ScanGameDirectory|m_running_item|SetRunning|IsRunning|edit_button|delete_button|refresh_button|QKeySequence::Refresh' src/launcher/src/configurationListWidget.cpp src/launcher/src/mainDialog.cpp src/launcher/src/configurationItem.cpp src/launcher/include

Repository: KytyPS5/KytyPS5

Length of output: 28389


Prevent refresh during an active game.

ScanGameDirectory() clears cfgs_list, which deletes the running ConfigurationItem and clears MainDialogPrivate::m_running_item. Each replacement item starts with m_running == false. Selecting the replacement therefore enables edit and delete actions while the process is still running. Guard the refresh button, shortcut, and context-menu action, or preserve the running item and its state during the rebuild.

✅ Addressed in commit 9e827e6

**@⁠coderabbitai[bot]** on GitHub · 2026-09-17 18:42 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/683#discussion_r4040291233) · edited 2026-09-18 05:14 UTC On `src/launcher/src/configurationListWidget.cpp` line 228 (outdated): ```diff @@ -222,6 +224,8 @@ ConfigurationListWidget::ConfigurationListWidget(QWidget* parent) m_ui->cfgs_list->setColumnWidth(GAME_STATUS_COLUMN, 150); m_ui->cfgs_list->setColumnWidth(GAME_COMMENT_COLUMN, 240); + connect(m_ui->refresh_button, &QToolButton::clicked, this, + &ConfigurationListWidget::ScanGameDirectory); ``` _🎯 Functional Correctness_ | _🟡 Minor_ | _⚡ Quick win_ <details> <summary>🔎 Supported by static analysis</summary> 🏁 Script executed: ```bash sed -n '190,310p' src/launcher/src/configurationListWidget.cpp sed -n '830,900p' src/launcher/src/configurationListWidget.cpp rg -n -C 5 'ScanGameDirectory|m_running_item|SetRunning|IsRunning|edit_button|delete_button|refresh_button|QKeySequence::Refresh' src/launcher/src/configurationListWidget.cpp src/launcher/src/mainDialog.cpp src/launcher/src/configurationItem.cpp src/launcher/include ``` Repository: KytyPS5/KytyPS5 Length of output: 28389 --- </details> **Prevent refresh during an active game.** `ScanGameDirectory()` clears `cfgs_list`, which deletes the running `ConfigurationItem` and clears `MainDialogPrivate::m_running_item`. Each replacement item starts with `m_running == false`. Selecting the replacement therefore enables edit and delete actions while the process is still running. Guard the refresh button, shortcut, and context-menu action, or preserve the running item and its state during the rebuild. <!-- fingerprinting:phantom:medusa:tapir --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:1ea9e1b8bd74b370266c5073 --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit 9e827e6
This discussion has been locked. Commenting is limited to contributors.
No description provided.