Skip to content

Conversation

@xmok
Copy link
Contributor

@xmok xmok commented Jan 7, 2026

Description

  • Add new draft invoice
  • Show discounts in Invoice

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: wave Issues related to the wave extension platform: macOS OP is author The OP of the PR is the author of the extension labels Jan 7, 2026
@raycastbot
Copy link
Collaborator

Thank you for the update! 🎉

Due to our current reduced availability, the initial review may take up to 10-15 business days.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 7, 2026

Greptile Summary

This PR adds draft invoice creation functionality and displays discount information in invoice details.

Key Changes:

  • New CreateInvoice component with form validation for creating draft invoices
  • Enhanced invoice GraphQL query to fetch subtotal, discounts, and discountTotal fields
  • Added calculateInvoiceItemAmount() utility to compute line item amounts accounting for discounts
  • Updated invoice markdown display to show subtotal, discounts, and properly calculated amounts
  • Refactored invoice filtering logic and added "Create Invoice" action to empty states

Issues Found:

  • Markdown table formatting error when no discounts exist (line 118 in manage-wave.tsx) - will cause visual rendering issues
  • Missing pipe separator in "Paid" table row (line 122) - creates inconsistent formatting
  • Duplicate form separators in create invoice form - minor styling issue

Confidence Score: 3/5

  • This PR has a critical markdown formatting bug that will break invoice display when discounts are absent
  • Score reflects solid implementation of new features with proper type safety and error handling, but the markdown table formatting bug on line 118 will cause broken invoice displays for invoices without discounts. The missing pipe separator on line 122 compounds the formatting issues. These are not runtime errors but will significantly impact user experience.
  • extensions/wave/src/manage-wave.tsx requires fixes for markdown table formatting issues on lines 118 and 122

Important Files Changed

Filename Overview
extensions/wave/src/lib/components/create-invoice.tsx New component to create draft invoices with form validation and API integration
extensions/wave/src/lib/types.ts Updated Invoice type to include subtotal, discounts, and proper currency types
extensions/wave/src/lib/utils.ts Added calculateInvoiceItemAmount function to handle discount-adjusted amounts
extensions/wave/src/manage-wave.tsx Integrated invoice creation, display discounts in markdown, but has markdown table formatting issues

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (3)

  1. extensions/wave/src/manage-wave.tsx, line 118 (link)

    logic: When invoice.discounts.length is 0, this line produces an empty string, which breaks markdown table formatting. The table will have a blank line between rows instead of a proper row.

  2. extensions/wave/src/manage-wave.tsx, line 122 (link)

    syntax: This row is missing the leading pipe separator, making table formatting inconsistent with other rows.

  3. extensions/wave/src/lib/components/create-invoice.tsx, line 109-111 (link)

    style: Duplicate Form.Separator components - only one separator is needed between sections.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

9 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@pernielsentikaer pernielsentikaer self-assigned this Jan 8, 2026
Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved 🔥

@raycastbot raycastbot merged commit 79e7e08 into raycast:main Jan 8, 2026
2 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Published to the Raycast Store:
https://raycast.com/xmok/wave

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: wave Issues related to the wave extension OP is author The OP of the PR is the author of the extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants