Skip to content

feat(usage): update personal usage empty state copy - #50

Closed
iscekic wants to merge 2 commits into
mainfrom
kwf/122cba52-5cab-46eb-948d-6a102774e2b3
Closed

iscekic wants to merge 2 commits into
mainfrom
kwf/122cba52-5cab-46eb-948d-6a102774e2b3

Conversation

@iscekic

@iscekic iscekic commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Changelog for users

  • On a personal account's usage page, the Detailed Breakdown table now shows 'No usage yet. Your first request will appear here.' when there is no usage for the selected period.

Changelog for maintainers

  • Empty-state copy for the Detailed Breakdown table is now selected by the pure helper usageTableEmptyMessage({ isLoading, isPersonalContext }) in usageEmptyMessage.ts; UsageAnalyticsDashboard.tsx passes isLoading: tableLoading and isPersonalContext: !isOrgContext, so personal and organization contexts take different branches. Check this helper first when the wrong copy renders.
  • The exported constants PERSONAL_USAGE_EMPTY_MESSAGE ('No usage yet. Your first request will appear here.') and ORGANIZATION_USAGE_EMPTY_MESSAGE ('No usage data for this period.') are the single source of the strings; editing copy means editing these.
  • isLoading: true returns the literal 'Loading usage…' for both contexts, so the personal message cannot render while the query is in flight.
  • The organization path keeps its previous string ('No usage data for this period.') both via the helper constant and the retained inline isOrgContext branch, so organization behavior is unchanged. Note the plan and task brief describe this string as 'No usage data.'; the code and new test use 'No usage data for this period.', which a reviewer should confirm is intended.
  • New usageEmptyMessage.test.ts asserts loading for both contexts, the personal branch, the organization branch, and the exact constant values; it runs under the shared workerSetup.ts suite, which the task report says tries to connect to PostgreSQL and fails without a database, so the test was not executed locally.
Owner request

In cloud's personal-account usage page, change its no-usage empty state to say exactly 'No usage yet. Your first request will appear here.' Preserve billing queries and existing design-system components. Generate the implementation plan; do not change code.

E2E proof

Proves that a zero-usage personal account on a non-'today' period sees exactly 'No usage yet. Your first request will appear here.' in the /usage Detailed Breakdown empty state, and that the shared organization usage-details page keeps its organization-specific copy ('No usage data for this period.') for a zero-usage enterprise org. Both scenarios run fully locally: the usageAnalytics tRPC responses are stubbed with successful zero-data results so no Snowflake call is made, the org scenario additionally stubs organizations.usageDetails.getAIAdoptionTimeseries with a schema-valid empty result so the enterprise AIAdoptionScoreCard makes no PostHog call, SKIP_STRIPE_API=true prevents Stripe calls during fake-login signup, and the org is inserted directly into local Postgres to avoid WorkOS. Coverage includes the useUsageTable data/loading hook that feeds both empty states, the OrganizationTrialWrapper that the org page layout renders around the dashboard, and the usage-details router file whose getAIAdoptionTimeseries procedure the org fixture intercepts.

Result: complete. 2 of 2 scenarios passed in patch revision 1.

On a personal account with zero usage, the /usage page's Detailed Breakdown empty state now shows exactly 'No usage yet. Your first request will appear here.'

  • Scenario: E2E-personal-usage-empty-message
  • Platform: web
  • Proof kind: fixture
  • Status: passed
  • Round: 1
  • Reason: Clef saw the expected result (matches 0.87, wrong_product_state 0.09, not_target_screen 0.04): The page shows the 'Detailed Breakdown' card with an empty table (no data rows), and the empty-state area rendered below the closing table tag shows exactly the centered muted text: No usage yet. Your first request will appear here. Neither No usage data. nor No usage data for this period. appears in the Detailed Breakdown card, and the summary/trends/breakdown panels render their zero states instead of the 'Usage data is catching up' pending card. Verifier note: Signed in a fresh zero-usage personal account (e2e-usage-empty-1791238800@example.com) and stubbed usageAnalytics tRPC responses locally, then opened /usage?period=7d. The final screen shows the 'Detailed Breakdown' card with a header-only table (Hour/Cost/Requests/Input Tokens/Output Tokens) and no data rows, and below the table the centered muted text exactly 'No usage yet. Your first request will appear here.'; no 'No usage data.' or 'No usage data for this period.' appears, and the Trends/summary/breakdown panels render zero states ('No data for the selected period.') rather than the 'Usage data is catching up' pending card. Artifacts screenshot.png (viewport) and snapshot.txt written to the scenario directory.
  • Clef: matches 0.87

On a personal account with zero usage, the /usage page's Detailed Breakdown empty state now shows exactly 'No usage yet. Your first request will appear here.'

snapshot.txt, lines 1 to 40 of 225:

- generic [active] [ref=f7e1]:
  - generic [ref=f7e2]:
    - link "Skip to main content" [ref=f7e3] [cursor=pointer]:
      - /url: "#main-content"
    - generic [ref=f7e4]:
      - generic [ref=f7e7]:
        - link "Kilo Homepage" [ref=f7e12] [cursor=pointer]:
          - /url: /profile
          - generic [ref=f7e21]: Kilo
        - generic [ref=f7e22]:
          - generic [ref=f7e23]:
            - generic [ref=f7e24]: Dashboard
            - list [ref=f7e26]:
              - listitem [ref=f7e27]:
                - link "Your Profile" [ref=f7e28] [cursor=pointer]:
                  - /url: /profile
              - listitem [ref=f7e33]:
                - link "Organizations" [ref=f7e34] [cursor=pointer]:
                  - /url: /organizations
              - listitem [ref=f7e40]:
                - link "Usage" [ref=f7e41] [cursor=pointer]:
                  - /url: /usage
          - generic [ref=f7e45]:
            - generic [ref=f7e46]: Cloud
            - list [ref=f7e48]:
              - listitem [ref=f7e49]:
                - link "App Builder" [ref=f7e50] [cursor=pointer]:
                  - /url: /app-builder
              - listitem [ref=f7e53]:
                - link "Cloud Agent" [ref=f7e54] [cursor=pointer]:
                  - /url: /cloud
              - listitem [ref=f7e58]:
                - link "Sessions" [ref=f7e59] [cursor=pointer]:
                  - /url: /cloud/sessions
              - listitem [ref=f7e62]:
                - link "Webhooks / Triggers" [ref=f7e63] [cursor=pointer]:
                  - /url: /cloud/triggers
              - listitem [ref=f7e69]:
                - link "Code Reviewer" [ref=f7e70] [cursor=pointer]:
                  - /url: /code-reviews

An organization with zero usage still shows the organization-specific empty copy in the /organizations//usage-details Detailed Breakdown table.

  • Scenario: E2E-org-usage-empty-message
  • Platform: web
  • Proof kind: fixture
  • Status: passed
  • Round: 1
  • Reason: Clef saw the expected result (matches 0.81, wrong_product_state 0.12, not_target_screen 0.07): The page shows the 'Detailed Breakdown' card with an empty table (no data rows), and its empty-state area rendered below the closing table tag shows exactly the centered muted text: No usage data for this period. The personal string No usage yet. Your first request will appear here. does not appear. Verifier note: Signed in via fake login, created the enterprise org 'Kilocode Local' (00000000-0000-0000-0000-000000000000) with an owner membership in local Postgres, and installed the tRPC interceptors that fulfill usageAnalytics.* and organizations.usageDetails.getAIAdoptionTimeseries with zero-data results while forwarding other procedures. Opening /organizations/00000000-0000-0000-0000-000000000000/usage-details?period=7d&view=ai-usage renders the 'Detailed Breakdown' card with an empty table (HOUR/COST/REQUESTS/INPUT TOKENS/OUTPUT TOKENS headers, no data rows) and the centered muted text 'No usage data for this period.' below it; the personal string 'No usage yet. Your first request will appear here.' is absent. No spinners or pending requests remained.
  • Clef: matches 0.81

An organization with zero usage still shows the organization-specific empty copy in the /organizations/<id>/usage-details Detailed Breakdown table.

Kilo workflow added 2 commits October 5, 2026 00:13
Patch revision 1 of workflow item 122cba52-5cab-46eb-948d-6a102774e2b3.
# Conflicts:
#	apps/web/src/components/usage-analytics/UsageAnalyticsDashboard.tsx
@iscekic

iscekic commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

Smoke run of the kilo-workflow publishing phase; closing.

@iscekic iscekic closed this Oct 5, 2026
@iscekic
iscekic deleted the kwf/122cba52-5cab-46eb-948d-6a102774e2b3 branch October 5, 2026 00:40
@iscekic
iscekic restored the kwf/122cba52-5cab-46eb-948d-6a102774e2b3 branch October 5, 2026 16:43
@iscekic iscekic reopened this Oct 5, 2026
@iscekic iscekic closed this Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant