Skip to content

Camera view refresh loop interferes with SD upload / job upload view #55

Description

@nathabee

Type

bug, camera, dashboard, upload, frontend

Problem

When an upload is started, navigating to the camera menu causes automatic refresh behavior that prevents the camera view from displaying correctly.

This looks like a frontend routing/state-management issue: a global dashboard refresh may be replacing the active view, reloading printer/job state, or triggering repeated view initialization while the upload job is active.

Expected behavior

During an upload:

  • the upload job should continue independently
  • the camera menu should remain usable
  • navigating to the camera view should not reset or destroy the active dashboard state
  • automatic refresh should update data, not reload/rebuild the whole screen repeatedly
  • upload polling and camera polling should not fight each other

Actual behavior

During upload, opening the camera menu causes repeated refresh behavior and the camera view cannot be shown reliably.

Likely causes

Possible causes to check:

  • global refreshDashboard() rebuilds the full DOM every few seconds
  • view initialization is repeated on every polling tick
  • selected menu/view state is overwritten by printer/job refresh
  • upload polling and camera polling both trigger broad dashboard refresh
  • camera view creates its own interval each time the menu is opened, without clearing the previous interval
  • route/menu state is not separated from data-refresh state

Design rule

Navigation state and data refresh must be separated.

Bad pattern:

poll printers/jobs -> rebuild dashboard -> reset active view -> re-enter default view

Correct pattern:

poll printers/jobs -> update shared state -> render only affected widgets
active view remains selected
camera view owns its own bounded polling lifecycle

Acceptance criteria

  • Start an upload.
  • Navigate to the camera menu.
  • Camera menu remains visible.
  • Upload continues.
  • No repeated full-page/view reset occurs.
  • Only one active polling interval exists per polling purpose.
  • Leaving the camera view stops camera-view-specific polling.
  • Returning to the camera view starts one fresh camera-view polling loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions