Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/widgets/system/MoonrakerDatabaseCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
v-bind="attrs"
icon
:loading="hasWait(`${$waits.onDatabaseRestore}/${item}`)"
:disabled="printerPrinting"
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

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

Consider using printerBusy instead of printerPrinting for these database operations. The printerBusy getter includes printing, paused, and busy states, which would be more appropriate since:

  1. Database restore operations trigger a socket disconnect (line 124), which would disrupt even a paused print
  2. Database compact and backup operations are intensive and could interfere with a paused print

Using printerBusy would provide better protection for users who have temporarily paused their prints.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

@pedrolamas pedrolamas Nov 16, 2025

Choose a reason for hiding this comment

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

Moonraker currently only disables this if the printer is printing, so we will keep this behavior as is.

Socket disconnect only affects Moonraker, Klipper will be unaffected.

@click="handleRestoreBackup(item)"
v-on="on"
>
Expand Down Expand Up @@ -77,6 +78,7 @@
class="mb-2"
color="primary"
:loading="hasWait($waits.onDatabaseCompact)"
:disabled="printerPrinting"
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

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

Consider using printerBusy instead of printerPrinting for the same reasons as the restore operation - database compacting is an intensive operation that could interfere with a paused print.

Suggested change
:disabled="printerPrinting"
:disabled="printerBusy"

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

Moonraker currently only disables this if the printer is printing, so we will keep this behavior as is.

@click="handleCompactDatabase"
>
{{ $t('app.database.btn.compact_database') }}
Expand All @@ -89,6 +91,7 @@
class="mb-2"
color="primary"
:loading="hasWaitsBy(`${$waits.onDatabasePostBackup}/`)"
:disabled="printerPrinting"
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

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

Consider using printerBusy instead of printerPrinting for the same reasons as the restore operation - creating a database backup is an intensive operation that could interfere with a paused print.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

Not necessary

@click="handleCreateBackup"
>
{{ $t('app.database.btn.create_backup') }}
Expand Down