Finalize dashboard in portal#136
Merged
Merged
Conversation
Collaborator
RasulOs
commented
Jun 2, 2026
- dashboard: add tasks dashboard tab with stats cards
- dashboard: add area chart sparkline, multi-status donut ring, icons, and status legend
- dashboard: touch tooltip, pull-to-refresh, and review fixes
- dashboard: cleanup, style alignment, and performance fixes
- dashboard: fix history pull-to-refresh spinner not dismissing
- dashboard: rename shared data fetch for single source of truth
- dashboard: fix scroll conflict, refresh UX, and cleanup
- dashboard: fix history refresh routing
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
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)
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.
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.
Contributor
🧪 Test Build ReadyAPK for PR #136 is available for testing. Download APK from workflow run Artifacts expire after 30 days. |
Contributor
🧪 Test Build ReadyAPK for PR #136 is available for testing. Download APK from workflow run Artifacts expire after 30 days. |
Contributor
🧪 Test Build ReadyAPK for PR #136 is available for testing. Download APK from workflow run Artifacts expire after 30 days. |
Closed
Contributor
🧪 Test Build ReadyAPK for PR #136 is available for testing. Download APK from workflow run Artifacts expire after 30 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.