Dashboard stats/chart minor cleanup: missing empty-state message, dead duplicate click-handler, dead computed field #101
Closed
opened 2026-09-01 00:13:39 -04:00 by jared
·
1 comment
No Branch/Tag Specified
main
development
fix/comment-markdown-persist-18
deploy-2026.10.03-279
deploy-2026.10.03-275
deploy-2026.09.26-272
deploy-2026.09.25-268
deploy-2026.09.25-264
deploy-2026.09.24-258
deploy-2026.09.24-254
deploy-2026.09.12-242
deploy-2026.09.12-238
deploy-2026.09.12-234
deploy-2026.09.12-230
deploy-2026.09.12-226
deploy-2026.09.12-222
deploy-2026.09.11-218
deploy-2026.09.11-214
deploy-2026.09.11-210
deploy-2026.09.11-206
deploy-2026.09.11-202
deploy-2026.09.11-198
deploy-2026.09.11-194
deploy-2026.09.11-190
deploy-2026.09.11-186
deploy-2026.09.09-182
deploy-2026.09.09-178
deploy-2026.09.08-172
deploy-2026.09.01-163
deploy-2026.08.08-155
deploy-2026.08.08-151
deploy-2026.08.08-147
deploy-2026.08.08-143
deploy-2026.08.08-139
deploy-2026.07.15-130
deploy-2026.07.15-122
deploy-2026.07.11-107
deploy-2026.06.30-96
deploy-2026.06.30-92
deploy-2026.06.30-88
deploy-2026.06.30-84
deploy-2026.06.30-80
deploy-2026.06.30-76
deploy-2026.06.30-72
deploy-2026.06.30-68
deploy-2026.04.29-49
deploy-2026.04.29-41
deploy-2026.04.18-35
deploy-2026.04.16-31
deploy-2026.04.16-27
deploy-2026.04.16-23
deploy-2026.04.16-11
deploy-2026.04.14-9
Labels
Clear labels
api
bug
concurrency
config
data-integrity
dead-code
documentation
duplicate
enhancement
help wanted
invalid
needs-decision
notifications
performance
priority/docs
priority/high
priority/low
priority/medium
question
rate-limiting
reliability
security
ux
wontfix
workflow
Bearer/internal API surface
Something is not working
Race condition / concurrency bug
Configuration / deployment default
Data correctness / schema / integrity issue
Unused / dead code cleanup
README / docs accuracy
This issue or pull request already exists
New feature
Need some help
Something is wrong
Needs a maintainer decision, not clearly a bug
Matrix / in-app notification bug
Performance or resource-usage concern
Documentation-only gap
High-severity / high-impact issue
Low-severity / cosmetic issue
Medium-severity issue
More information is needed
Rate limiting behavior
Reliability / error-handling gap
Security or access-control impact
User-facing UX/functional bug
This won't be fixed
Ticket status workflow engine
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/tinker_tickets#101
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: Low (bundled cleanup — three small findings from the same audit pass)
Charts render a bare empty frame with no message when the filtered dataset is empty.
views/DashboardView.php(makeDonut/makeBar, ~lines 336, 369) —if (!ctx || !data.length) return;silently skips chart creation. Reachable on a fresh install, or when a non-admin's visibility-filtered ticket set happens to be zero. Fix: render a simple "No data for current filters" message in the chart's place.Stat cards have two independent, redundant click-handler implementations — one is dead code with misleading HTML attributes.
assets/js/base.js(lt.statsFilter.init(), ~lines 608-628) reads each card'sdata-filter-key/data-filter-valattributes and callswindow.lt_onStatFilter(key, val)on click — but that global function is never defined anywhere in the app (confirmed via grep), so this handler only toggles a cosmetic.activeclass with no functional effect. The actual navigation logic is a completely separate, duplicated handler atDashboardView.php(~lines 1280-1293) that ignores thedata-filter-key/data-filter-valattributes entirely. Both fire on the same click today with no visible symptom (the real handler navigates away before anyone would notice), but the markup looks load-bearing and isn't — a trap for a future edit that touches one implementation assuming it's the only one. Fix: delete the deadlt.statsFilterhandler and the now-unuseddata-filter-key/data-filter-valattributes, since the real logic lives entirely inDashboardView.php.created_this_weekis computed inStatsModel::fetchAllStats()'s counts query on every single request but is never displayed or read anywhere in the UI — dead computed field, harmless but wasted query work on every dashboard load. Fix: remove it from the query if genuinely unused, or wire it into a widget if it was meant to be shown.Fixed and verified (real MariaDB/GD/jsdom/etc. as applicable). Merged to main in commit
cef1689.