Skip to content

feat(AFC): Adding AFC print dialog#1900

Merged
pedrolamas merged 10 commits into
fluidd-core:developfrom
jimmyjon711:afc_print_dialog
Jul 9, 2026
Merged

feat(AFC): Adding AFC print dialog#1900
pedrolamas merged 10 commits into
fluidd-core:developfrom
jimmyjon711:afc_print_dialog

Conversation

@jimmyjon711

Copy link
Copy Markdown
Contributor
  • Porting over AFC print dialog that's currently in mainsail.
  • Cleaned up some of the spool code so that it was not repeated in AfcPrintStartDialogTool.vue as the same code for the tooltip is being used from AfcCardUnitLaneBody.vue

Note: This was done with the help from claude and reviewed after.

AFC Print Dialog working from Jobs page:

fluidd_jobs_print_dialog.mp4

AFC Print Dialog from Main page:

fluidd_jobs_print_dialog.mp4

Signed-off-by: Jim Madill jcmadill1@gmail.com

…d-On

Signed-off-by: Jim Madill <jcmadill1@gmail.com>
- Refactored code with the help from claude to clean up looking up spool
data and added a common method into afc mixin to easily return all necessary
information for lane to be used in the lane panel and AFC print dialog.

Signed-off-by: Jim Madill <jcmadill1@gmail.com>
- Reverted weight check
- Added new warning for notifying user that filament is not loaded into
lane.

Signed-off-by: Jim Madill <jcmadill1@gmail.com>
@pedrolamas pedrolamas added the FR - Enhancement New feature or request label Jul 4, 2026
@pedrolamas pedrolamas added this to the 1.37.3 milestone Jul 4, 2026
@pedrolamas
pedrolamas requested a review from Copilot July 4, 2026 07:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an AFC “print start” dialog (ported from Mainsail) to guide lane/tool mapping and surface basic filament/lane warnings before starting a job, while also de-duplicating AFC lane/spool lookup logic via the AFC mixin.

Changes:

  • Introduces new AFC print-start dialog components (dialog + per-tool row) and wires the dialog into the Jobs/FileSystem and main status flows.
  • Centralizes AFC lane+spool derived data in AfcMixin.getAfcLaneInfo() and refactors the lane card to use it.
  • Adds English i18n strings and a shared typing for the derived lane/spool info shape.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/typings/klipper.d.ts Adds Klipper.AfcSpoolLaneInfo typing for derived lane/spool info used by UI.
src/mixins/afc.ts Adds getAfcLaneInfo() helper and shouldShowAfcDialog() gating for when to open the dialog.
src/locales/en.yaml Adds app.afc.PrintStartDialog.* translations for dialog UI and warnings.
src/components/widgets/status/PrinterStatusCard.vue Embeds dialog and triggers it from reprint flow before starting a job.
src/components/widgets/filesystem/FileSystem.vue Embeds dialog and triggers it from Jobs/FileSystem “Print” action.
src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue New per-tool row component (lane selection + warnings/tooltip).
src/components/widgets/afc/dialogs/AfcPrintStartDialog.vue New dialog wrapper; fetches metadata on open if needed, then starts print.
src/components/widgets/afc/AfcCardUnitLaneBody.vue Refactors spool/lane display logic to use the new mixin helper.

Comment thread src/mixins/afc.ts Outdated
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue
…g is shown.

Signed-off-by: Jim Madill <jcmadill1@gmail.com>
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialog.vue Outdated
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialog.vue Outdated
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue Outdated
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue Outdated
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue Outdated
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue Outdated
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue Outdated
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue Outdated
Comment thread src/components/widgets/afc/dialogs/AfcPrintStartDialogTool.vue Outdated
Signed-off-by: Jim Madill <jcmadill1@gmail.com>
Comment thread src/components/widgets/filesystem/FileSystem.vue Outdated
Comment thread src/components/widgets/status/PrinterStatusCard.vue Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Comment thread src/mixins/afc.ts
Comment on lines +116 to +123
get usedTools (): number[] {
const filamentWeights: number[] = this.currentFile?.filament_weights ?? []

return filamentWeights.reduce<number[]>((tools, weight, index) => {
if (weight > 0) tools.push(index)
return tools
}, [])
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not valid anymore since AFC Print Dialog will only show up if weight is valid in metadata.

@pedrolamas
pedrolamas merged commit 3b1fdbb into fluidd-core:develop Jul 9, 2026
4 checks passed
@jimmyjon711
jimmyjon711 deleted the afc_print_dialog branch July 10, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FR - Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants