Skip to content

Feat/dashboard#134

Closed
Ramtx wants to merge 7 commits into
droidrun:mainfrom
Ramtx:feat/dashboard
Closed

Feat/dashboard#134
Ramtx wants to merge 7 commits into
droidrun:mainfrom
Ramtx:feat/dashboard

Conversation

@Ramtx
Copy link
Copy Markdown
Contributor

@Ramtx Ramtx commented May 29, 2026

No description provided.

Ramtx added 3 commits May 29, 2026 14:00
Transform the History screen into a tabbed Tasks screen with Dashboard
and History tabs. The dashboard shows performance metrics, a 14-day
activity sparkline, success rate, and total runs — computed client-side
from a single listTasks(pageSize=100) call, matching the cloud dashboard
strategy. Rename the main-page button from "History" to "Tasks".
…and status legend

Replace the bar-chart sparkline with a smooth area chart (gradient fill,
cubic bezier line, date labels on the X axis) matching the cloud's
ActivitySparkline. Upgrade the success rate card with a multi-segment
donut ring showing all statuses (completed, failed, cancelled, running,
created, paused) with colored legend dots and per-status counts. Add
lucide-style vector icons to the Performance and Tasks card headers.
Add interactive touch tooltip to the sparkline chart — dragging a finger
shows a floating bubble with the date and task count, with a dashed
cursor line and highlighted dot. Add SwipeRefreshLayout for pull-to-
refresh on the dashboard tab.

Fix 7 issues from code review:
- Cache LinearGradient shader instead of allocating per frame
- Hide dashboardLoading spinner when SwipeRefresh is active
- Use maxOrNull for lastTaskAgoMs instead of relying on API sort order
- Use per-side padding in SuccessRingView oval calculation
- Add STATUS_TRACKING_TIMEOUT to status color and label maps
- Compute last ring slice as remainder to close the ring exactly
- Disable SwipeRefreshLayout during sparkline touch interaction
@Ramtx Ramtx force-pushed the feat/dashboard branch from 05792c9 to 381f606 Compare May 29, 2026 04:21
Align with codebase conventions:
- Rename data classes to Portal prefix (PortalDashboardStats,
  PortalStatusCount, PortalDayActivity)
- Move formatDuration, formatTimeAgo, statusColor to PortalTaskUiSupport
- Remove dead StatusCount.label field and formatModelLabel wrapper
- Replace all FQN references with proper imports
- Remove dead cachedChartTop/cachedChartBottom fields from SparklineView

Performance and correctness:
- Move PortalDashboardStats.compute() off the UI thread
- Seed history tab from cached dashboard data (skip redundant fetch)
- Add claimedAt field to PortalTaskHistoryItem for accurate duration
- Add sample size hint to performance and success rate cards
- Clear stale history items on dashboard refresh
- Remove tab-reselect auto-refresh (pull-to-refresh only)
@Ramtx Ramtx force-pushed the feat/dashboard branch from 381f606 to 4807767 Compare May 29, 2026 04:25
Ramtx added 2 commits May 29, 2026 14:39
The history SwipeRefreshLayout spinner never stopped because
renderDashboardState() early-returns when the history tab is active.
Move the spinner dismissal into the loadDashboard callback directly,
and re-seed the history list from fresh cache when the user refreshes
from the history tab.
Rename loadDashboard→loadData, isDashboardLoading→isDataLoading,
dashboardRequestToken→dataRequestToken, hasLoadedDashboard→hasLoadedData,
cachedDashboardPage→cachedTaskPage. Both tabs now clearly share one data
fetch — names reflect that neither tab owns the data.
@Ramtx Ramtx marked this pull request as draft May 29, 2026 05:02
Fix ListView scroll conflict with SwipeRefreshLayout — pull-to-refresh
now only triggers when the list is scrolled to the top. Show error Toast
when refresh fails on the History tab. Keep old items visible during
refresh instead of flashing empty state. Remove dead PortalDayActivity
date field. Move tooltip string to resources. Extract duplicated
SwipeRefreshLayout configuration into shared helper.
@Ramtx Ramtx marked this pull request as ready for review May 29, 2026 05:36
@RasulOs
Copy link
Copy Markdown
Collaborator

RasulOs commented Jun 3, 2026

Continued here: #136

@RasulOs RasulOs closed this Jun 3, 2026
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.

2 participants