-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat ui/ux: cost chart in task panel #3025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
This pull request introduces several new components related to cost visualization and appearance settings. To improve clarity and focus, consider splitting the changes into two separate pull requests:
Splitting the pull request will help in reviewing and testing the changes more effectively. Thank you! |
|
this look good 💪 |
|
This is very nice. Might need an accordion to hide the graph, but keep the details visible so it doesn't take up as much vertical space |
|
This is awesome, but let's hide it when the Task Header is minimized. :) Additional thoughts:
|
Thank you! To be clear, you want to remove the sparkline completely when the task header is minimized / in compact mode?
Yes but LLM + Shadcn all know Recharts the best, I have used several packages and this will help keep development speed high. As long as recharts bundle doesn't affect first load performance and so on (which I guess it may). Do we have an automated test/performance benchmark to see how page load times might be affected from a PR change?
Please challenge everything! It's the only path to perfection. For me personally I prefer watching only the cumulative chart. I don't care so much about spikes I just want to see the overall task curve starting to go exponential. I also think since the cost value on the task header represents cumulative it is more intuitive to show the cumulative chart there (if the sparkline is on my default). Side note I'd probably change UX writing to "Total" and "Each" instead of cumulative and task to clarify. |
Yep. I know this is asking to hides / revert a nice little bit of work (😭 ) but the goal right now is to keep that task header as lightweight as possible when it is minimized and shunt more info into the expanded interface. (We'll need to work around that mess sooner or later, too.)
We don't. Yet. Right now just do your best to keep package sizes down. 😇
Consider (but I won't impose it) a biaxial chart: https://recharts.org/en-US/examples/BiaxialLineChart Could even mix bars/lines. |
No problem at all on reverting the sparkline – I completely agree with the goal of keeping the minimized header as lightweight as possible. That makes sense, happy to adjust it.
I'm going to spare everyone my thoughts on biaxial charts because it's a very controversial subject in data viz... but I am strongly on one camp. To boil it all down I would definitely not use them here for informational clarity and preserving horizontal space. Regarding bars, I would not use bars + lines to represent same $ values per request (same unit should be same visualize categorically for minimal mental burden.) That leaves tabs, hamburger, or one chart. Since per each request chart provide 80% of the value, and every additional chart provides diminishing returns. Where the cumul. captures those returns best it still also starts reflecting into negative UI territory if you are going through a minimization push right now. So I think one chart in expanded view showing the per each task may be favorable. I'll keep this open for more replies before next iteration thanks everyone for the feedback so far. |
Ahhhh no what did I walk into 💀 |
Good idea one chart per accordion might be ideal to combine show/hide with chart switching and chart compare. |
|
Closing the PR and updating it to new version w/ uplot: #3063 |
Context
I always find myself wanting to know the cost curve of the whole task, especially I want to know when the costs start going what feels like exponential. Rather than always guess I wanted a chart so I could see if costs were increasing linearly or not. In the future I think costs can have more sophisticated management with thresholds and alerts.
My hypothesis is a sparkline will help me gauge cost momentum by the shape of the curve. It is also nice to see when certain tasks cost more relative to others, as this feedback can help me improve my workflow.
Thoughts
The end of a task increases $$ non-linearly and if we can prevent users from reaching into this cost danger zone we can save everyone lots of money. For example I was using 2.5 Pro, my very last task cost like $5 by accident, so I wish roo handled such cost management for me so I can use my attention for other things.
Thinking out loud -- maybe it's feature bloat, especially the sparkline. I prefer having it on though personally and performance of recharts is good, so maybe it is something we can toggle in settings, but wrap into part of a greater cost management system.
Implementation
Concept for feedback.
Important
Adds cost visualization charts to the task panel using
recharts, enhancing cost tracking in the UI.CostSparklineandCostTrendChartcomponents.CostSparklineshows a small line chart of cost history inTaskHeader.CostTrendChartprovides a detailed view with toggleable modes (cumulative/task) inTaskHeader.CostSparklinecomponent inCostSparkline.tsxfor compact cost visualization.CostTrendChartcomponent inCostTrendChart.tsxfor detailed cost analysis.TaskHeader.tsxto include cost charts and manage view modes.costHistoryinChatView.tsxfrom API request messages.costHistorytoTaskHeaderfor chart rendering.rechartslibrary topackage.jsonfor chart rendering.This description was created by
for 36fa40c. You can customize this summary. It will automatically update as commits are pushed.