Skip to content

Display weekly material usage in material update form - #683

Merged
mnindrazaka merged 1 commit into
mainfrom
claude/zealous-euler-smblwt
Oct 26, 2026
Merged

mnindrazaka merged 1 commit into
mainfrom
claude/zealous-euler-smblwt

Conversation

@mnindrazaka

Copy link
Copy Markdown
Collaborator

Summary

Add display of weekly material usage (average over the last 14 days of transactions) to the material update form. This metric is fetched from the backend and shown as read-only information to help users understand consumption patterns.

Changes

  • MaterialUpdateUsecase: Track weeklyUsage in state, initialized from preloaded material or fetched from repository
  • MaterialFormView: Add conditional "Weekly Usage" section displaying the metric with unit and explanatory text
  • MaterialUpdateHandler & MaterialUpdateScreen: Thread weeklyUsage prop through the presentation layer
  • Tests: Add coverage for weekly usage display in both handler and usecase layers; verify it does not appear when creating new materials

Implementation details

  • Weekly usage is optional in the form view (only renders when defined) to support both create and update flows
  • The value is read-only and accompanied by a helper text explaining it represents average usage over 14 days
  • Storybook story added to demonstrate the weekly usage display

https://claude.ai/code/session_01XkL3Cm4kBqDVqiTtmGUhY3

Weekly usage is server-computed, so it is carried in the update use case's
context alongside (not inside) the submitted form values and rendered as a
read-only field. The create form omits it since a new material has no usage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkL3Cm4kBqDVqiTtmGUhY3
@vercel

vercel Bot commented Oct 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
gatherloop-order Ignored Ignored Oct 26, 2026 6:29am UTC
gatherloop-pos Ignored Ignored Oct 26, 2026 6:29am UTC
gatherloop-ui-storybook Ignored Ignored Oct 26, 2026 6:29am UTC

@mnindrazaka
mnindrazaka merged commit 88d2d69 into main Oct 26, 2026
7 checks passed
@mnindrazaka
mnindrazaka deleted the claude/zealous-euler-smblwt branch October 26, 2026 06:31
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