Skip to content

Master dev#354

Merged
OSPFNeighbour merged 9 commits intomasterfrom
master-dev
Mar 21, 2026
Merged

Master dev#354
OSPFNeighbour merged 9 commits intomasterfrom
master-dev

Conversation

@OSPFNeighbour
Copy link
Collaborator

This pull request introduces major improvements to how job and team tasking data is fetched and refreshed in the tasking UI, focusing on efficiency, scalability, and UI responsiveness. The changes implement debounced and batched fetching for newly visible jobs, periodic batch refreshes for stale jobs, and smarter updates when tasking status changes. Additionally, marker styling now updates live when job priority changes, and some code clean-up and UI improvements have been made.

Tasking Data Fetching and Refresh Improvements

  • Implemented debounced, batched fetching of tasking data for jobs as they become visible, reducing redundant API calls and improving load performance. (main.js, scheduleInitialTaskingFetch, filteredJobs.subscribe) [1] [2]
  • Added periodic batch refresh for all visible jobs whose tasking data is stale, with a configurable refresh interval and a timer that auto-restarts on config changes. (main.js, fetchBatchJobTasking, startBatchTaskingTimer, refreshInterval.subscribe) [1] [2] [3]
  • Removed per-job polling logic from the Job model, centralizing refresh logic in the main view model for efficiency and maintainability. (Job.js)

Tasking Status and UI Consistency

  • Ensured that when tasking status changes (e.g., assign, update, call off, untask), both the job and its team are force-refreshed and the team data is also refreshed for UI consistency. (main.js, various status update methods) [1] [2] [3] [4]
  • Improved initial loading of team tasking data when teams become visible, only fetching for genuinely new teams and avoiding redundant calls. (main.js, filteredTeamsAgainstConfig.subscribe)

Live Marker and UI Updates

  • Job map markers now update their style live when job priority changes, including cluster/group reassignment if the job becomes a rescue. (jobMarker.js, syncMarkerStyle) [1] [2] [3]
  • Fixed marker subscription management and ensured marker style and cluster group are always in sync with job data. (jobMarker.js) [1] [2]

Miscellaneous Improvements and Cleanups

  • Added clear methods for job/team search inputs and streamlined some imports. (main.js, spotlightSearch.js) [1] [2] [3] [4]
  • Updated job status logic to use the correct API for completion and improved sector filter logic. (main.js) [1] [2]
  • Minor typo fix in a comment and code cleanup. (main.js)
  • Adjusted incomplete taskings computation to exclude "Untasked" status. (Job.js)

These changes collectively make the tasking UI more performant, responsive, and maintainable, especially for large incident loads and frequent job/team updates.

OSPFNeighbour and others added 9 commits March 20, 2026 21:49
removed redundant info from config LS
* function to complete a job

* and date is needed
* first

* removed too much! put it back

* shitty theme
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.2.7 to 3.4.2.
- [Commits](WebReflection/flatted@v3.2.7...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add confirmation modal for refreshInterval changes

Prevent accidental changes to refreshInterval by tracking the last value and showing a confirmation modal whenever the observable is changed. A showRecklessModal helper is injected into the DOM (id: recklessModal) and requires the user to type "reckless" to confirm; onCancel reverts the observable to the previous value. Implementation uses bootstrap.Modal and creates/removes event handlers for confirm/cancel and the modal close button.

* gated
Adjust dark-mode CSS for vehicle popup tasking list: add styling for team badge (.veh-pop__team-title .badge.bg-light) with darker background (#444), text and border tweaks; set explicit background for tasking items (.veh-pop__tasking-item, --no-job) to #383838; set muted text color to #b0b0b0; and update hover background to #434343 to improve contrast and consistency in dark mode.
* Batch job tasking fetch and debounce

Add batched and debounced tasking fetches to reduce per-job API calls and bursts. main.js: introduce a 250ms debounced initial-load batch for newly filtered-in jobs, a periodic batch refresh (driven by config.refreshInterval) and timer management (start/restart). Job.js: remove per-job periodic refresh checks, add a SINGLE_FETCH_COOLDOWN_MS (10s) and make fetchTasking honor a force option to avoid redundant single-job requests right after batch updates. Team.js: gate fetchTasking against both last fetch time and last bulk refresh time, clear loading state when throttled, and make updateFromJson do defensive/no-op updates to avoid unnecessary observable writes. shared/BeaconClient/job.js: extend getTasking to accept single id or array of ids, build multi-JobIds parameters, and use paginated JSON fetch to return a unified Results array. Overall this reduces API traffic, prevents duplicate refreshes, and avoids unnecessary UI churn.

* Missed one type

* teams not refreshing after tasking

* sector fuckery when just wanting to see all jobs

* bad bar for sectors
@OSPFNeighbour OSPFNeighbour merged commit 4cd75c5 into master Mar 21, 2026
1 check passed
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