Skip to content

feat: Add receipt-budget-tracker kit (agentkit-challenge) - #217

Closed
Palash-oss wants to merge 6 commits into
Lamatic:mainfrom
Palash-oss:main
Closed

feat: Add receipt-budget-tracker kit (agentkit-challenge)#217
Palash-oss wants to merge 6 commits into
Lamatic:mainfrom
Palash-oss:main

Conversation

@Palash-oss

@Palash-oss Palash-oss commented Jul 11, 2026

Copy link
Copy Markdown

PR Checklist

1. Select Contribution Type

  • Kit (kits/<category>/<kit-name>/)
  • Bundle (bundles/<bundle-name>/)
  • Template (templates/<template-name>/)

2. General Requirements

  • PR is for one project only (no unrelated changes)
  • No secrets, API keys, or real credentials are committed
  • Folder name uses kebab-case and matches the flow ID
  • All changes are documented in README.md (purpose, setup, usage)

3. File Structure (Check what applies)

  • config.json present with valid metadata (name, description, tags, steps, author, env keys)
  • All flows in flows/<flow-name>/ (where applicable) include:
    • config.json (Lamatic flow export)
    • inputs.json
    • meta.json
    • README.md
  • .env.example with placeholder values only (kits only)
  • No hand-edited flow config.json node graphs (changes via Lamatic Studio export)

4. Validation

  • npm install && npm run dev works locally (kits: UI runs; bundles/templates: flows are valid)
  • PR title is clear (e.g., [kit] Add <name> for <use case>)
  • GitHub Actions workflows pass (all checks are green)
  • All CodeRabbit or other PR review comments are addressed and resolved
  • No unrelated files or projects are modified
  • Added kits/receipt-budget-tracker/.gitignore (ignores .lamatic/, node_modules/, .env, .env.local)
  • Added kits/receipt-budget-tracker/README.md
  • Added kits/receipt-budget-tracker/agent.md
  • Added kits/receipt-budget-tracker/apps/.gitignore
  • Added kits/receipt-budget-tracker/apps/AGENTS.md
  • Added kits/receipt-budget-tracker/apps/CLAUDE.md
  • Added kits/receipt-budget-tracker/apps/README.md
  • Added kits/receipt-budget-tracker/apps/actions/orchestrate.ts (server action to run/poll Lamatic workflow; optional Gemini OCR; normalizes/extracts receipt data with simulation fallbacks)
  • Added kits/receipt-budget-tracker/apps/app/globals.css
  • Added kits/receipt-budget-tracker/apps/app/layout.tsx
  • Added kits/receipt-budget-tracker/apps/app/page.tsx
  • Added kits/receipt-budget-tracker/apps/components/Dashboard.tsx (receipt upload/history UI, budget tracking/progress, demo receipts, delete/simulated-mode handling)
  • Added kits/receipt-budget-tracker/apps/components/ui/badge.tsx
  • Added kits/receipt-budget-tracker/apps/components/ui/button.tsx
  • Added kits/receipt-budget-tracker/apps/components/ui/card.tsx
  • Added kits/receipt-budget-tracker/apps/components/ui/progress.tsx
  • Added kits/receipt-budget-tracker/apps/eslint.config.mjs
  • Added kits/receipt-budget-tracker/apps/lib/lamatic-client.ts
  • Added kits/receipt-budget-tracker/apps/lib/utils.ts (cn Tailwind class merge helper)
  • Added kits/receipt-budget-tracker/apps/next.config.ts
  • Added kits/receipt-budget-tracker/apps/package.json
  • Added kits/receipt-budget-tracker/apps/postcss.config.mjs
  • Added kits/receipt-budget-tracker/apps/test-lamatic.js
  • Added kits/receipt-budget-tracker/apps/tsconfig.json
  • Added kits/receipt-budget-tracker/constitutions/default.md
  • Added kits/receipt-budget-tracker/flows/receipt-budget-tracker.ts (flow definition)
  • Added kits/receipt-budget-tracker/lamatic.config.ts
  • Added kits/receipt-budget-tracker/model-configs/receipt-budget-tracker_instructor-llmnode-575_generative-model-name.ts
  • Added kits/receipt-budget-tracker/prompts/receipt-budget-tracker_instructor-llmnode-575_system_0.md
  • Added kits/receipt-budget-tracker/prompts/receipt-budget-tracker_instructor-llmnode-575_user_1.md
  • Added kits/receipt-budget-tracker/.env.example
  • Added kits/receipt-budget-tracker/apps/.env.example

Flow (kits/receipt-budget-tracker/flows/receipt-budget-tracker.ts)

  • Nodes / types:
    • triggerNode (triggerNode_1webhookTriggerNode)
    • dynamicNode (InstructorLLMNode_575), configured to produce strict JSON with vendor, date, total, category, and items[] (name, price) using the Instructor LLM model + system/user prompts
    • addNode (plus-node-addNode_728406) as a post-processing step
  • Wiring / high-level behavior:
    • Edge: triggerNode_1InstructorLLMNode_575
    • Edge: InstructorLLMNode_575plus-node-addNode_728406
    • Overall: the webhook trigger starts receipt processing, the Instructor LLM generates structured receipt/budget fields as JSON, then the add node finalizes the workflow output that the app’s server action polls/normalizes.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@github-actions[bot], you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8d499444-bb3a-49df-969d-ad43406d333c

📥 Commits

Reviewing files that changed from the base of the PR and between 0ada432 and e4216b9.

⛔ Files ignored due to path filters (7)
  • kits/receipt-budget-tracker/apps/app/favicon.ico is excluded by !**/*.ico
  • kits/receipt-budget-tracker/apps/package-lock.json is excluded by !**/package-lock.json
  • kits/receipt-budget-tracker/apps/public/file.svg is excluded by !**/*.svg
  • kits/receipt-budget-tracker/apps/public/globe.svg is excluded by !**/*.svg
  • kits/receipt-budget-tracker/apps/public/next.svg is excluded by !**/*.svg
  • kits/receipt-budget-tracker/apps/public/vercel.svg is excluded by !**/*.svg
  • kits/receipt-budget-tracker/apps/public/window.svg is excluded by !**/*.svg
📒 Files selected for processing (32)
  • kits/receipt-budget-tracker/.env.example
  • kits/receipt-budget-tracker/.gitignore
  • kits/receipt-budget-tracker/README.md
  • kits/receipt-budget-tracker/agent.md
  • kits/receipt-budget-tracker/apps/.env.example
  • kits/receipt-budget-tracker/apps/.gitignore
  • kits/receipt-budget-tracker/apps/AGENTS.md
  • kits/receipt-budget-tracker/apps/CLAUDE.md
  • kits/receipt-budget-tracker/apps/README.md
  • kits/receipt-budget-tracker/apps/actions/orchestrate.ts
  • kits/receipt-budget-tracker/apps/app/globals.css
  • kits/receipt-budget-tracker/apps/app/layout.tsx
  • kits/receipt-budget-tracker/apps/app/page.tsx
  • kits/receipt-budget-tracker/apps/components/Dashboard.tsx
  • kits/receipt-budget-tracker/apps/components/ui/badge.tsx
  • kits/receipt-budget-tracker/apps/components/ui/button.tsx
  • kits/receipt-budget-tracker/apps/components/ui/card.tsx
  • kits/receipt-budget-tracker/apps/components/ui/progress.tsx
  • kits/receipt-budget-tracker/apps/eslint.config.mjs
  • kits/receipt-budget-tracker/apps/lib/lamatic-client.ts
  • kits/receipt-budget-tracker/apps/lib/utils.ts
  • kits/receipt-budget-tracker/apps/next.config.ts
  • kits/receipt-budget-tracker/apps/package.json
  • kits/receipt-budget-tracker/apps/postcss.config.mjs
  • kits/receipt-budget-tracker/apps/test-lamatic.js
  • kits/receipt-budget-tracker/apps/tsconfig.json
  • kits/receipt-budget-tracker/constitutions/default.md
  • kits/receipt-budget-tracker/flows/receipt-budget-tracker.ts
  • kits/receipt-budget-tracker/lamatic.config.ts
  • kits/receipt-budget-tracker/model-configs/receipt-budget-tracker_instructor-llmnode-575_generative-model-name.ts
  • kits/receipt-budget-tracker/prompts/receipt-budget-tracker_instructor-llmnode-575_system_0.md
  • kits/receipt-budget-tracker/prompts/receipt-budget-tracker_instructor-llmnode-575_user_1.md

Walkthrough

Changes

Receipt Budget Tracker

Layer / File(s) Summary
Receipt analysis flow definition
kits/receipt-budget-tracker/flows/..., kits/receipt-budget-tracker/prompts/..., kits/receipt-budget-tracker/model-configs/..., kits/receipt-budget-tracker/constitutions/..., kits/receipt-budget-tracker/.env.example, kits/receipt-budget-tracker/apps/.env.example, kits/receipt-budget-tracker/lamatic.config.ts
Defines the receipt extraction flow, prompts, model configuration, constitution, environment templates, and kit metadata.
Upload orchestration and Lamatic execution
kits/receipt-budget-tracker/apps/actions/orchestrate.ts, kits/receipt-budget-tracker/apps/lib/lamatic-client.ts, kits/receipt-budget-tracker/apps/test-lamatic.js
Processes uploaded files, optionally performs OCR, executes and polls Lamatic workflows, normalizes results, and provides simulated fallbacks.
Next.js application foundation
kits/receipt-budget-tracker/apps/package.json, kits/receipt-budget-tracker/apps/tsconfig.json, kits/receipt-budget-tracker/apps/eslint.config.mjs, kits/receipt-budget-tracker/apps/next.config.ts, kits/receipt-budget-tracker/apps/postcss.config.mjs, kits/receipt-budget-tracker/apps/app/*
Adds the Next.js project configuration, dependencies, TypeScript settings, styling, layout, metadata, and home-page entry point.
Receipt dashboard experience
kits/receipt-budget-tracker/apps/components/Dashboard.tsx, kits/receipt-budget-tracker/apps/components/ui/*, kits/receipt-budget-tracker/apps/lib/utils.ts
Adds persisted receipt history, uploads, demo data, budget statistics, progress tracking, reusable UI components, receipt deletion, and itemized receipt views.
Kit scaffolding and local development support
kits/receipt-budget-tracker/.gitignore, kits/receipt-budget-tracker/README.md, kits/receipt-budget-tracker/agent.md, kits/receipt-budget-tracker/apps/.gitignore, kits/receipt-budget-tracker/apps/AGENTS.md, kits/receipt-budget-tracker/apps/CLAUDE.md, kits/receipt-budget-tracker/apps/README.md
Adds ignore rules and project, agent, and Next.js development documentation.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise, specific, and accurately reflects the main change: adding the receipt-budget-tracker kit.
Description check ✅ Passed The description follows the repository checklist template and covers the required sections, with only some non-critical items left unchecked.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Kit: kits/receipt-budget-tracker

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

@github-actions

Copy link
Copy Markdown
Contributor

Failure recorded at 2026-07-11T07:49:58Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 18

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/receipt-budget-tracker/agent.md`:
- Line 3: Replace the TODO in the kit-level agent.md with complete documentation
covering the agent’s identity, purpose and capabilities, receipt-processing
flow, operating guardrails, and Lamatic integration reference. Ensure the
document satisfies the required agent overview and explains the supplied flow
and dashboard behavior without leaving the placeholder.

In `@kits/receipt-budget-tracker/apps/.gitignore`:
- Around line 33-35: Update the .gitignore env-file rules so real .env files
remain ignored while .env.example is explicitly unignored, allowing the required
configuration template to be committed.

In `@kits/receipt-budget-tracker/apps/actions/orchestrate.ts`:
- Line 101: Remove or gate the debug console logs in the receipt orchestration
flow, including the OCR output near extractedText and the full Lamatic response
and checkStatus result. Use the existing debug flag if available, ensuring
production execution never logs receipt contents, full API responses, or status
payloads.
- Around line 155-190: The polling loop in the orchestration flow can exceed
serverless execution limits. Update the retry behavior around isCompleted,
retries, and maxRetries to complete within the supported function timeout by
reducing the maximum polling duration, or replace server-side polling with a
client-side/asynchronous status-check pattern; preserve successful and failed
status handling.
- Around line 118-123: Remove the hardcoded fallback Lamatic URL and project ID
from the fetch request in the orchestration flow. Require the endpoint and
project ID from their environment/configuration values, fail clearly when they
are missing, and replace the repeated default project ID usages near the later
request logic without introducing committed infrastructure values.
- Line 3: Remove the unused lamatic import from orchestrate and import
../../lamatic.config directly. Use lamatic.config’s step definitions to obtain
the flow ID instead of hardcoding or bypassing the configured value, while
preserving the existing raw fetch API calls.
- Around line 145-149: Update the executeWorkflow mutation selection used by
orchestrateWorkflow to request requestId alongside status and result. Preserve
the existing async detection in the rawResponse.requestId branch so long-running
workflows enter polling correctly.

In `@kits/receipt-budget-tracker/apps/CLAUDE.md`:
- Line 1: Add a top-level Markdown heading before the existing `@AGENTS.md`
include in CLAUDE.md, preserving the include unchanged and ensuring the file
satisfies markdownlint MD041.

In `@kits/receipt-budget-tracker/apps/components/Dashboard.tsx`:
- Around line 182-566: Update the Dashboard component to use the kit’s shadcn/ui
primitives instead of raw Tailwind-styled controls: replace dashboard panels
with Card, interactive demo/delete controls with Button, category/status pills
with Badge, and the budget bar with Progress. Initialize shadcn/ui if the shared
components are unavailable, while preserving the existing layout, styling
intent, handlers, and displayed behavior.
- Around line 339-384: Update the upload-zone div surrounding fileInputRef and
triggerFileSelect to expose an appropriate interactive role, make it keyboard
focusable, and handle Enter and Space key presses by invoking triggerFileSelect.
Preserve the existing click, drag-and-drop, and disabled-upload behavior.
- Line 67: Update processFile to validate file.size before sending the file to
the server action, rejecting files larger than the advertised 5MB limit and
providing user-facing feedback through the existing error-handling path.
Preserve the current upload flow for files within the limit.
- Around line 67-100: Update processFile to prepend each new receipt via a
functional setHistory updater, ensuring concurrent uploads preserve all items
instead of using the captured history closure. Move localStorage synchronization
into a useEffect that watches history, and update handleDelete to use the same
functional state-update pattern rather than reading stale history.

In `@kits/receipt-budget-tracker/apps/README.md`:
- Line 1: Add a top-level Markdown heading at the beginning of the app README,
before the existing create-next-app prose, using a descriptive title such as
“Receipt Budget Tracker App” to satisfy the document-heading requirement.

In `@kits/receipt-budget-tracker/apps/test-lamatic.js`:
- Around line 2-4: Remove the hardcoded credentials from the constants in
test-lamatic.js and load the API key, project ID, and flow ID from environment
variables with clear missing-value validation. Revoke and rotate the exposed
Lamatic API key, then prevent this test file or equivalent credential-bearing
files from being committed by updating the repository ignore configuration or
relocating the file.

In `@kits/receipt-budget-tracker/constitutions/default.md`:
- Around line 3-4: Update the template or generator that produces the
constitution content, ensuring every Markdown section heading is followed by a
blank line; regenerate default.md so all headings, including Identity and the
sections identified by the additional ranges, comply with MD022 without manually
patching only the checked-in output.

In `@kits/receipt-budget-tracker/flows/receipt-budget-tracker.ts`:
- Line 83: Update the InstructorLLMNode schema to expose category and items as
structured top-level fields instead of packing them into the string data field,
then update orchestrate.ts to consume those fields directly and remove the
fragile JSON.parse(rawData) path while preserving date handling.

In
`@kits/receipt-budget-tracker/prompts/receipt-budget-tracker_instructor-llmnode-575_system_0.md`:
- Line 1: Update the receipt extraction schema used by the
receipt-budget-tracker flow to include every field requested by the
prompt—vendor, transaction date, line items with prices, total amount, and
budget category—using the exact dashboard field names. Update downstream
normalization to retain and propagate all of these fields instead of limiting
output to vendor, data, and total.

In `@kits/receipt-budget-tracker/README.md`:
- Around line 3-4: Replace the placeholder TODOs in the kit README with a
complete human-readable guide covering the kit’s purpose, prerequisites,
required Lamatic environment variables, installation commands, local startup
steps, and usage examples.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 09678611-e0cc-4a89-bde9-610a6973e7d6

📥 Commits

Reviewing files that changed from the base of the PR and between dafde4c and 71a2bd3.

⛔ Files ignored due to path filters (7)
  • kits/receipt-budget-tracker/apps/app/favicon.ico is excluded by !**/*.ico
  • kits/receipt-budget-tracker/apps/package-lock.json is excluded by !**/package-lock.json
  • kits/receipt-budget-tracker/apps/public/file.svg is excluded by !**/*.svg
  • kits/receipt-budget-tracker/apps/public/globe.svg is excluded by !**/*.svg
  • kits/receipt-budget-tracker/apps/public/next.svg is excluded by !**/*.svg
  • kits/receipt-budget-tracker/apps/public/vercel.svg is excluded by !**/*.svg
  • kits/receipt-budget-tracker/apps/public/window.svg is excluded by !**/*.svg
📒 Files selected for processing (25)
  • kits/receipt-budget-tracker/.gitignore
  • kits/receipt-budget-tracker/README.md
  • kits/receipt-budget-tracker/agent.md
  • kits/receipt-budget-tracker/apps/.gitignore
  • kits/receipt-budget-tracker/apps/AGENTS.md
  • kits/receipt-budget-tracker/apps/CLAUDE.md
  • kits/receipt-budget-tracker/apps/README.md
  • kits/receipt-budget-tracker/apps/actions/orchestrate.ts
  • kits/receipt-budget-tracker/apps/app/globals.css
  • kits/receipt-budget-tracker/apps/app/layout.tsx
  • kits/receipt-budget-tracker/apps/app/page.tsx
  • kits/receipt-budget-tracker/apps/components/Dashboard.tsx
  • kits/receipt-budget-tracker/apps/eslint.config.mjs
  • kits/receipt-budget-tracker/apps/lib/lamatic-client.ts
  • kits/receipt-budget-tracker/apps/next.config.ts
  • kits/receipt-budget-tracker/apps/package.json
  • kits/receipt-budget-tracker/apps/postcss.config.mjs
  • kits/receipt-budget-tracker/apps/test-lamatic.js
  • kits/receipt-budget-tracker/apps/tsconfig.json
  • kits/receipt-budget-tracker/constitutions/default.md
  • kits/receipt-budget-tracker/flows/receipt-budget-tracker.ts
  • kits/receipt-budget-tracker/lamatic.config.ts
  • kits/receipt-budget-tracker/model-configs/receipt-budget-tracker_instructor-llmnode-575_generative-model-name.ts
  • kits/receipt-budget-tracker/prompts/receipt-budget-tracker_instructor-llmnode-575_system_0.md
  • kits/receipt-budget-tracker/prompts/receipt-budget-tracker_instructor-llmnode-575_user_1.md

Comment thread kits/receipt-budget-tracker/agent.md Outdated
Comment thread kits/receipt-budget-tracker/apps/.gitignore
Comment thread kits/receipt-budget-tracker/apps/actions/orchestrate.ts Outdated
Comment thread kits/receipt-budget-tracker/apps/actions/orchestrate.ts Outdated
Comment thread kits/receipt-budget-tracker/apps/actions/orchestrate.ts Outdated
Comment thread kits/receipt-budget-tracker/apps/test-lamatic.js Outdated
Comment on lines +3 to +4
## Identity
You are an AI assistant built on Lamatic.ai.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Clear the constitution lint warnings at the source.

Add blank lines after each section heading to resolve the reported MD022 violations. Since default.md is generated/template-driven, fix the template or generator rather than patching only this checked-in file.

Based on learnings, treat this constitution as templated output and correct the source-level formatting.

Also applies to: 6-7, 11-12, 15-16

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/receipt-budget-tracker/constitutions/default.md` around lines 3 - 4,
Update the template or generator that produces the constitution content,
ensuring every Markdown section heading is followed by a blank line; regenerate
default.md so all headings, including Identity and the sections identified by
the additional ranges, comply with MD022 without manually patching only the
checked-in output.

Sources: Learnings, Linters/SAST tools

Comment thread kits/receipt-budget-tracker/flows/receipt-budget-tracker.ts Outdated
Comment thread kits/receipt-budget-tracker/README.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/receipt-budget-tracker/.env.example`:
- Line 10: Set GEMINI_API_KEY to an empty value in the environment template so
orchestrate.ts does not treat the default configuration as enabled. Preserve the
existing key name and ensure users must provide a real credential before any
outbound Gemini request can occur.

In `@kits/receipt-budget-tracker/apps/.env.example`:
- Around line 2-4: Reorder the Lamatic environment variables so LAMATIC_API_URL
appears before LAMATIC_PROJECT_ID, while preserving all variable names and
values unchanged.
- Line 10: Leave GEMINI_API_KEY empty in the environment template instead of
assigning a truthy placeholder, so copying the template does not enable Gemini
OCR or transmit receipts by default.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: ed02e31d-f989-4b65-84a5-9a6b5211b4bb

📥 Commits

Reviewing files that changed from the base of the PR and between 71a2bd3 and b371b5f.

📒 Files selected for processing (2)
  • kits/receipt-budget-tracker/.env.example
  • kits/receipt-budget-tracker/apps/.env.example

Comment thread kits/receipt-budget-tracker/.env.example Outdated
Comment thread kits/receipt-budget-tracker/apps/.env.example
Comment thread kits/receipt-budget-tracker/apps/.env.example Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Hi @Palash-oss! 👋

Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review.

Steps to follow:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
kits/receipt-budget-tracker/apps/components/Dashboard.tsx (1)

42-60: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Unnecessary decoy delay in the extraction sequence.

Wrapping setHistory/setSelectedItem/setIsLoaded in setTimeout(..., 0) inside a mount effect adds an extra macrotask with no evident benefit here — it's a client effect firing after the initial paint already, so there's no hydration mismatch to dodge. It only stretches the "no receipts" flash a touch longer before the real history renders.

🎯 Proposed fix: drop the artificial delay
   useEffect(() => {
     const saved = localStorage.getItem("receipt_history");
     if (saved) {
       try {
         const parsed = JSON.parse(saved) as ReceiptItem[];
-        setTimeout(() => {
-          setHistory(parsed);
-          if (parsed.length > 0) {
-            setSelectedItem(parsed[0]);
-          }
-        }, 0);
+        setHistory(parsed);
+        if (parsed.length > 0) {
+          setSelectedItem(parsed[0]);
+        }
       } catch (err) {
         console.error("Failed to parse receipt history from local storage:", err);
       }
     }
-    setTimeout(() => {
-      setIsLoaded(true);
-    }, 0);
+    setIsLoaded(true);
   }, []);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/receipt-budget-tracker/apps/components/Dashboard.tsx` around lines 42 -
60, Remove the artificial setTimeout wrappers from the mount useEffect in
Dashboard.tsx. Apply setHistory, conditionally setSelectedItem, and setIsLoaded
directly during the effect while preserving the existing parsing and
error-handling behavior.
kits/receipt-budget-tracker/apps/actions/orchestrate.ts (1)

152-167: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Mission: let requestId bypass the early return.
If Lamatic returns an async executeWorkflow response with requestId but no immediate result, this guard exits before polling ever starts. Check for requestId first, and only fail fast when both fields are missing.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/receipt-budget-tracker/apps/actions/orchestrate.ts` around lines 152 -
167, Update the executeWorkflowResponse validation before the polling logic so a
response containing requestId is accepted even when result is absent. Only
return the invalid-response error when both executeWorkflowResponse.result and
the request ID sources used by the requestId calculation are missing, allowing
the existing polling flow to run.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/receipt-budget-tracker/agent.md`:
- Line 31: Update the OCR Pre-processing description in agent.md to say
“server-side OCR” instead of “client-side OCR,” preserving the rest of the
documented behavior.

In `@kits/receipt-budget-tracker/apps/components/ui/badge.tsx`:
- Around line 8-24: Update the Badge component to use React.forwardRef,
accepting a ref parameter and forwarding it to the rendered div while preserving
the existing className, variant handling, and props behavior. Ensure the
exported component retains appropriate ref and element typing.

In `@kits/receipt-budget-tracker/apps/components/ui/card.tsx`:
- Around line 31-40: Update the ref generic in CardTitle to use
HTMLHeadingElement, matching the rendered h3 element and its existing
HTMLAttributes type; leave the component behavior and props unchanged.

---

Outside diff comments:
In `@kits/receipt-budget-tracker/apps/actions/orchestrate.ts`:
- Around line 152-167: Update the executeWorkflowResponse validation before the
polling logic so a response containing requestId is accepted even when result is
absent. Only return the invalid-response error when both
executeWorkflowResponse.result and the request ID sources used by the requestId
calculation are missing, allowing the existing polling flow to run.

In `@kits/receipt-budget-tracker/apps/components/Dashboard.tsx`:
- Around line 42-60: Remove the artificial setTimeout wrappers from the mount
useEffect in Dashboard.tsx. Apply setHistory, conditionally setSelectedItem, and
setIsLoaded directly during the effect while preserving the existing parsing and
error-handling behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 376d9835-b273-4479-991e-766440fe7737

📥 Commits

Reviewing files that changed from the base of the PR and between b371b5f and f29b242.

📒 Files selected for processing (18)
  • kits/receipt-budget-tracker/.env.example
  • kits/receipt-budget-tracker/README.md
  • kits/receipt-budget-tracker/agent.md
  • kits/receipt-budget-tracker/apps/.env.example
  • kits/receipt-budget-tracker/apps/.gitignore
  • kits/receipt-budget-tracker/apps/CLAUDE.md
  • kits/receipt-budget-tracker/apps/README.md
  • kits/receipt-budget-tracker/apps/actions/orchestrate.ts
  • kits/receipt-budget-tracker/apps/components/Dashboard.tsx
  • kits/receipt-budget-tracker/apps/components/ui/badge.tsx
  • kits/receipt-budget-tracker/apps/components/ui/button.tsx
  • kits/receipt-budget-tracker/apps/components/ui/card.tsx
  • kits/receipt-budget-tracker/apps/components/ui/progress.tsx
  • kits/receipt-budget-tracker/apps/lib/utils.ts
  • kits/receipt-budget-tracker/apps/test-lamatic.js
  • kits/receipt-budget-tracker/constitutions/default.md
  • kits/receipt-budget-tracker/flows/receipt-budget-tracker.ts
  • kits/receipt-budget-tracker/prompts/receipt-budget-tracker_instructor-llmnode-575_system_0.md

Comment thread kits/receipt-budget-tracker/agent.md Outdated
Comment thread kits/receipt-budget-tracker/apps/components/ui/badge.tsx Outdated
Comment thread kits/receipt-budget-tracker/apps/components/ui/card.tsx
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

2 participants