Skip to content

update tasks-tracker plugin for league 6 dbrow support#11518

Merged
riktenx merged 1 commit into
runelite:masterfrom
osrs-reldo:tasks-tracker-leagues-6
Apr 15, 2026
Merged

update tasks-tracker plugin for league 6 dbrow support#11518
riktenx merged 1 commit into
runelite:masterfrom
osrs-reldo:tasks-tracker-leagues-6

Conversation

@tylerthardy
Copy link
Copy Markdown
Contributor

@tylerthardy tylerthardy commented Apr 15, 2026

Summary

Adds TaskSourceType (STRUCT/DBROW) so tasks can be loaded from cache DB rows, not just structs. Needed because Jagex is moving L6 onto DB tables.

Changes

Core

  • TaskSourceType enum discriminator on task types
  • TaskFromDbRow reads columns via client.getDBTableField(dbRowId, colIdx, 0); intParamMap/stringParamMap values are column indices in this mode
  • ITask interface; TaskService branches on source type
  • TaskFromDbRow.getVarpIndex() returns sortId (matches cs2's flat-index completion convention)

Safety fixes exposed by the new path

  • TaskFromDbRow.loadData: per-column try/catch. Sparse columns throw when queried on rows without them; previously one bad column killed the task load and cascaded to a type-switch failure.
  • processTaskStatus: bounds-check taskVarps.get(varbitIndex) before getVarpValue. Prevents per-tick IOOB when sortIds exceed the varp range.
  • addSortedIndex comparators: null int params coerce to 0, strings use nullsLast. Without this, sort throws mid-thenCompose and taskTypeChanged=true never fires - tasks load but panel never redraws.
  • getTaskIndex: null-guarded. containsKey doesn't protect against a null value, and addSortedIndex's put-null-then-replace race can strand a null if the sort throws.
  • TaskPanel: null-guard task.getDescription() so missing descriptions render empty instead of "null".

Pre-existing bug uncovered

  • FilterService.getGlobalFilterByKey does blocking HTTP on first call. Previously masked because every task type had GLOBAL filters, so startUp()'s off-EDT setTaskType always warmed the cache. A task type with empty filters leaves it cold; next EDT-driven switch to a type with GLOBAL filters throws Blocking network calls are not allowed on the event dispatch thread and NPEs on the null return.
  • Added FilterService.preloadFilterConfigs() called from startUp() via runAsync, independent of saved task type.
  • setTaskType null-guards globalFilterConfig as a belt-and-braces for preload failure.

@runelite-github-app
Copy link
Copy Markdown

@runelite-github-app
Copy link
Copy Markdown

This plugin requires a review from a Plugin Hub maintainer. The reviewer will request any additional changes if needed.


Internal use only: Reviewer details Maintainer details

@riktenx riktenx merged commit 2ef24af into runelite:master Apr 15, 2026
2 of 3 checks passed
Infinitay pushed a commit to Infinitay/plugin-hub that referenced this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants