Skip to content

Commit 3efb4c1

Browse files
github-actions[bot]wuvictor-95JasonCWangLightspark Engbsiaotickchong
authored
[github-bot] rerun check-ent-db on multiple alembic heads
## Reason Request ch (#486) * [github-bot] rerun check-ent-db on multiple alembic heads (#20535) ## Reason Request changes might be spammy. Context here: https://lightsparkgroup.slack.com/archives/C03HYQQ2HT6/p1758132593755079 ## Overview - Remove request changes - Rerun `check-ent-db` job if it was previously successful AND there is a multiple alembic head issue GitOrigin-RevId: 5ec32cb83e6a12de65f907a18b3377f092ded98a * [Nage] Add pagination to manage team (#20507) ![Screenshot 2025-09-17 at 3.19.56 PM.png](https://app.graphite.dev/user-attachments/assets/f1a64e6a-0d37-43ef-a794-0bd7f70f70a1.png) GitOrigin-RevId: 804faa0ee1e2b113bc964cb126e535fcb7a4c8af * CI update lock file for PR * [nage] add filters to CommandCenter, allow empty url filter states (#20659) - adds support for filtering from the CommandCenter - adds filters to nage app state so that the CommandCenter can use it - updates url saving and loading to allow empty states for filters - fixes first down key in CommandCenter going to the 2nd entry - refactors CommandCenter to use a SectionConfig interface so it's more hierarchical rather than repeating section name props - adds filter icon - fixes date picker sometimes showing unstyled ("closed" according to the date picker component) state - removes unused CommandCenter actions ![Screenshot 2025-09-23 at 3.02.44 PM.png](https://app.graphite.dev/user-attachments/assets/972dab61-6668-4c01-bbfd-392451ad514f.png) ![Screenshot 2025-09-23 at 3.02.50 PM.png](https://app.graphite.dev/user-attachments/assets/2885a534-ed34-49a7-bc92-1466890c5176.png) ![Screenshot 2025-09-23 at 3.02.57 PM.png](https://app.graphite.dev/user-attachments/assets/b9fdb4d4-1b92-4714-9bc8-974c92b45f4d.png) GitOrigin-RevId: 4dfae1d573feeddbe95536ed8ff6bdb94becb00a * Update from public js-sdk main branch (#20649) Update public `js` sources with the latest code from the [public repository](https://github.com/lightsparkdev/js-sdk) main branch. This typically happens when new versions of the SDK are released and version updates need to be synced. The PR should be merged as soon as possible to avoid updates to webdev overwriting the changes in the js-sdk develop branch. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Lightspark Eng <engineering@lightspark.com> Co-authored-by: Corey Martin <coreyn.martin@gmail.com> GitOrigin-RevId: cb91a9eb1d432f6bbd117d417b3b4a1557b23285 * CI update lock file for PR * [nage] PX-894 add proper validation in create sandbox flow (#20687) - removes redundant predicate/error definitions in favor of useFields validation system - adds validators for url, domain, domainName - adds validation for all sandbox creation steps ![Screenshot 2025-09-24 at 2.53.00 PM.png](https://app.graphite.dev/user-attachments/assets/540038d9-10d8-4fda-af6f-07b4d486e4f7.png) GitOrigin-RevId: 365d96cc4c2f2900a1c236e91a57d40af243db36 * [nage] fix infinite render on webhook log table, fix various dropdown styling, fix loading style (#20696) - fixes infinite re-render on webhook event log table - fixes various dropdowns (allows passing through custom typography as well to the dropdown items) - fixes loading style for some tables by adding min height and adding display flex ![Screenshot 2025-09-24 at 4.39.09 PM.png](https://app.graphite.dev/user-attachments/assets/04a912c4-2607-4276-9ab6-be0456550381.png) ![Screenshot 2025-09-24 at 4.40.44 PM.png](https://app.graphite.dev/user-attachments/assets/95e294e8-c68c-462c-8b28-d181db66ad46.png) GitOrigin-RevId: 0d218dcc56cc8adc79cbe2f66c38a5a1f5bab1b4 * [nage] fix detail page panel ratio (#20737) - sometimes the details page wasn't actually displaying 50 50 ratio for the left and right panels - uses display grid instead - when clicking ghost buttons a slight border was appearing; fixes theme for active border color ![Screenshot 2025-09-25 at 3.58.29 PM.png](https://app.graphite.dev/user-attachments/assets/db2ca2bc-970b-44a7-b736-d1690971763a.png) GitOrigin-RevId: 286e1ce2a89e6be0fb2684cf5774c78e13e76d81 * [nage] misc ui polish, sticky header and nav (#20758) - makes header sticky - makes side nav sticky - allows scrolling halves of details pages separately - makes code header sticky - updates sidenav and command center icons - fixes close button icon in header - fixes num digits depending on totp version - fixes id and string filter empty state color - fixes docs button color ![Screenshot 2025-09-26 at 5.58.03 PM.png](https://app.graphite.dev/user-attachments/assets/9b549ebc-d38f-47e0-becc-35a885ce5a58.png) ![Screenshot 2025-09-26 at 5.58.14 PM.png](https://app.graphite.dev/user-attachments/assets/7e42da90-ce3b-404f-9e18-66e0a87ea6e4.png) GitOrigin-RevId: bff8d9e0d94bcc3e3ad6e7805117d00da6954d87 * claude dot em dee (#20770) ## Reason Claude.md! you can get these by running /init in the main repo however, this pr splits it into **three** separate claude files. the reason for this is that claude md files are recursive, so you can store javascript specific context in the js/claude.md, and it'll be added to context if you do any searches or tool calls in the /js directory GitOrigin-RevId: 388a42b64bb640dcc522ba27b725683cae451b6d * [uma-bridge] fix various striga UI formatting, fix striga button loading states (#20809) - updates paddings in various places - fixes button loading states GitOrigin-RevId: 98d53ca854796b5023c9c99044504923673e6322 * [nage] fix umame invitation query ordering, fix data manager table page numbers (#20855) - invitations were not being returned in the correct order due to the 2nd query not returning in the same order - also fixes data manager table page numbers not appearing when exactly 4 pages were present GitOrigin-RevId: 48088c26f0933c6b10fa41041efe24f1b191d1fe * [ui] avoid resetting pagination when filters are present in DataManagerTable (#20858) - when a filter was applied to a table, there was a bug where page number would get reset upon loading the next page - fix avoids this by removing filterOptions from the dependencies of the useEffect responsible for loading filters from the URL GitOrigin-RevId: aadb0e5a86e6797973b9216a9a452d5db4b4c35e * update claude md files with sonnet 4.5 (#20895) ## Reason claude sonnet 4.5 was released, this feature updates the claude.md files to better take advantage of its improvements GitOrigin-RevId: 807e44bc70b59ac8c4b16c9dfa370eef907f8886 * Revert "[github-bot] rerun check-ent-db on multiple alembic heads (#20535)" (#20908) ## Reason Explain *why* this change is being made. ## Overview For large or complex changes, describe what is being changed. ## Test Plan Explain how you tested the change. GitOrigin-RevId: 48778d9c4c1a08d74145b2071c5bbd13e05950d7 * CI update lock file for PR * implement EU friendly date format for birthdays (#20944) ## Reason Add support for European date format (DD/MM/YYYY) in the BirthdayInput component to accommodate international users. ## Overview - Added a `dateFormat` prop to the BirthdayInput component that accepts either "US" (MM/DD/YYYY) or "EU" (DD/MM/YYYY) - Created a DATE_FORMATS constant to centralize format configurations - Updated the formatBirthday, isValidBirthday, and formatDateToText functions to handle both date formats - Modified the VerifyIdentityModal to use the EU date format GitOrigin-RevId: b7d1666d5c840d3766fe72ddbd22f4eb33116194 * [striga] refactor VerifyStrigaIdentity into smaller components (#20956) ## Reason - repeated switch/if statements - duplicate state being set based on striga_kyc_status - navigation logic was coupled together ## Overview - splits each step into a different component file - uses predicates to have a single for loop determine which component to show - makes component logic more local - fixes styling issue with text inputs and top margins ![Screenshot 2025-10-08 at 1.24.49 PM.png](https://app.graphite.dev/user-attachments/assets/8a5b238f-eaa7-43bf-a68f-706bc310718d.png) - fixes kyc approved screen styling - fixes status redirect outlet navigating immediately when the user is kyc approved (I think previously this didn't trigger because it wasn't re-rendering) ## Test Plan validated that the identity flow is working GitOrigin-RevId: 7b650ced73d242de38d0f9398cc98e3e51393d54 * add validation GitOrigin-RevId: 6ba572df1b1d3f448fd61f565733de202d8d3e57 * add BRL (brazilian real) fiat currency unit (#21138) ## Reason Add BRL fiat currency unit Required for Tazapay integration GitOrigin-RevId: 7a97b90afcde613678788592b2ade815c6cfa187 * [tazapay] refactor link bank components into one (#21137) ## Reason Currently there's a lot of repeated code for tazapay link bank screens and it will continue to grow as we add more regions. ## Overview - refactors into single component agnostic of region so that styling is uniform and amount of code needed to add a new one is smaller - single BridgeCardForm that dynamically renders the appropriate fields based on region - single mutation with input constructed from the required fields TODO: add all the other regions GitOrigin-RevId: 2c256de4a94349c1b83af979ef8a057180894299 * [tazapay] add CAD region and additional support for other regions (#21197) ## Reason Add Canada region support for tazapay ## Overview - frontend fields added for canada (bank_code, branch_code, account_number) - adds new validator to check maximum length - adds tazapay_cad_account_integration - adds mapping of bank codes to bank names so that the bank name doesn't need to be input - adds bank_code and branch_code to optional input - adds currencies for other tazapay regions to various places - adds create_cad_bank_destination to tazapay_client to Account creation is working but linking bank is not. TODO: - need to add address step because canada requires address ![Screenshot 2025-10-17 at 3.37.00 PM.png](https://app.graphite.dev/user-attachments/assets/6dd7f204-6163-498e-88ae-5d4669773f6f.png) GitOrigin-RevId: db6964ecb17f4c6c046bf16bb0baf23ed9a58d5f * [tazapay] add step to collect full address for certain regions (#21257) ## Reason We need full address before connecting bank for certain regions (CA, DK, HK) ## Overview - adds step to VerifyIdentityTazapayCore to collect address - fixes loading state - adds backend support for sending postal address to tazapay when creating the beneficiary (adding a bank) ![Screenshot 2025-10-21 at 4.22.57 PM.png](https://app.graphite.dev/user-attachments/assets/2865801f-1921-489a-89a8-f70f18129791.png) ## Test Plan Tested manually GitOrigin-RevId: d07919ac322c7f43a1207ad9db52dde3c7233190 * [TazaPay] Change INR decimals from 0 to 2 and add INR to cent currencies (#21321) ## Reason Add support for INR (Indian Rupee) as a currency with decimal formatting and fix the decimal precision for INR in the Tazapay integration. ## Overview - Added INR to the list of currencies that should be formatted with a currency symbol in the frontend - Updated the decimal precision for INR from 0 to 2 in the Tazapay VASP integration to correctly handle rupee amounts with paise GitOrigin-RevId: d54f760c6d9408fa10322cf269b758689c21f217 * Add mise for sparkcore + ops (#21338) ## Reason Add `mise` configuration to standardize development environment setup and task execution across the project. This provides a consistent way to manage tool versions, dependencies, and common development tasks. ## Overview - Added root `.mise.toml` with global tasks and settings - Created directory-specific configurations for JS, Ops frontend, and Sparkcore - Added comprehensive documentation in `MISE.md` explaining: - Installation and setup process - Available tasks for each project component - Common workflows and troubleshooting tips - Environment variable management The configuration enables developers to run standardized commands like `mise sparkcore-local`, `mise ops`, and `mise rds dev` from anywhere in the repository, while also providing context-aware tasks when working in specific directories. ## Test Plan Tested the configuration by: 1. Installing mise and running `mise bootstrap` on a fresh environment 2. Verifying all tools (Node.js, Python, uv) were correctly installed 3. Testing key tasks in each directory (sparkcore, js, ops) 4. Confirming environment variables are properly set in each context 5. Validating that the task delegation works correctly from the root directory GitOrigin-RevId: 3ffdc9e8c839b32548fa3b7595f2ce9554fd9b38 * Adding a way to generate an unparsed invoice (#21359) ## Reason The easiest way to match incoming payments to invoices is by using the invoice id. The current createInvoice parses the invoice object returning the invoice itself. This adds a function to return the full invoice object. GitOrigin-RevId: 51fadfadde48645e2a04dd44a70ba27dcf1627d9 * adding changesets * Peng typescript unparsed invoice (#21426) Invoices in the typescript lib previously only included the invoice string. This updates the create invoice mutation to return a full invoice fragment GitOrigin-RevId: 1007d66cd28ded615471a79c811c60dd86d1fe9f --------- Co-authored-by: wuvictor95 <38848800+wuvictor-95@users.noreply.github.com> Co-authored-by: Jason Wang <jason@lightspark.com> Co-authored-by: Lightspark Eng <engineering@lightspark.com> Co-authored-by: Brian Siao Tick Chong <bsiaotickchong@gmail.com> Co-authored-by: lightspark-ci-js-sdk[bot] <134011073+lightspark-ci-js-sdk[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Corey Martin <coreyn.martin@gmail.com> Co-authored-by: Matt Davis <matthappens@gmail.com> Co-authored-by: Aaryaman Bhute <aaryaman@lightspark.com> Co-authored-by: Aaryaman Bhute <35084309+AaryamanBhute@users.noreply.github.com> Co-authored-by: Aaron Kanter <alkanter@gmail.com> Co-authored-by: Peng Ying <peng@lightspark.com>
1 parent d85e963 commit 3efb4c1

22 files changed

Lines changed: 1106 additions & 457 deletions

File tree

.changeset/grumpy-badgers-hug.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@lightsparkdev/ui": patch
3+
---
4+
5+
Component enhancements to birthday input, tables, icons

.changeset/social-comics-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@lightsparkdev/core": patch
3+
---
4+
5+
Adding additional currency mappings

.changeset/sour-readers-show.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@lightsparkdev/lightspark-sdk": patch
3+
---
4+
5+
adding createInvoiceWithDetails to get the full invoice object instead of just the bolt11 invoice

.mise.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[env]
2+
MISE_NODE_COREPACK = true
3+
4+
[tools]
5+
node = "latest"
6+
7+
[tasks.deps]
8+
description = "Install all JS dependencies"
9+
run = "yarn install"
10+
11+
[tasks.dev]
12+
description = "Start all development servers"
13+
run = "yarn dev"
14+
15+
[tasks.build]
16+
description = "Build all packages and apps"
17+
run = "yarn build"
18+
19+
[tasks.lint]
20+
description = "Lint all packages"
21+
run = "yarn lint"
22+
23+
[tasks.format]
24+
description = "Check formatting"
25+
run = "yarn format"
26+
27+
[tasks.format-fix]
28+
description = "Fix formatting issues"
29+
run = "yarn format:fix"
30+
31+
[tasks.test]
32+
description = "Run all tests"
33+
run = "yarn test"
34+
35+
[tasks.clean]
36+
description = "Clean all build artifacts"
37+
run = "yarn clean-all"
38+
39+
[tasks.ops]
40+
description = "Start ops frontend development server"
41+
run = "cd apps/private/ops && yarn start"
42+
43+
[tasks.ops-minikube]
44+
description = "Start ops frontend connected to minikube"
45+
run = "cd apps/private/ops && yarn start:minikube"
46+
47+
[tasks.gql-codegen]
48+
description = "Generate GraphQL code"
49+
run = "yarn gql-codegen"

CLAUDE.md

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code when working in the js/ directory.
4+
5+
## Overview
6+
7+
JavaScript/TypeScript monorepo for Lightspark's Lightning Network and UMA services. Public SDKs, internal applications, and shared packages using Yarn workspaces + Turbo.
8+
9+
## Structure
10+
11+
- **packages/** - Shared libraries
12+
- **core/** - Auth, utilities
13+
- **lightspark-sdk/** - Public Lightning SDK
14+
- **ui/** - React components, design system
15+
- **private/** - Internal utilities, GraphQL clients
16+
- **apps/examples/** - Public examples and CLI tools
17+
- **apps/private/** - Internal apps (site, ops, uma-bridge)
18+
19+
## Essential Commands
20+
21+
### Setup
22+
```bash
23+
nvm use || nvm install # Match Node version
24+
corepack enable && corepack prepare --activate # Enable Yarn
25+
yarn # Install all workspace dependencies
26+
```
27+
28+
### Development Workflow
29+
```bash
30+
# Start applications
31+
yarn start site uma-bridge ops # Specific apps (@lightsparkdev/ prefix implied)
32+
yarn start private # All private apps
33+
yarn start examples # All examples
34+
35+
# Code quality
36+
yarn lint && yarn format # Lint + Prettier
37+
yarn checks # Full validation: deps, lint, format, test, circular-deps
38+
39+
# Building
40+
yarn build # Build all workspaces with Turbo caching
41+
yarn build --force # Rebuild without cache
42+
43+
# Testing
44+
yarn test # Run all tests
45+
yarn workspace @lightsparkdev/ui test # Test specific workspace
46+
47+
# GraphQL codegen
48+
yarn gql-codegen # Regenerate TypeScript types from schemas
49+
```
50+
51+
### Workspace Targeting
52+
```bash
53+
# From repo root
54+
yarn workspace @lightsparkdev/<name> <command>
55+
56+
# From workspace directory
57+
cd apps/private/uma-bridge && yarn start
58+
```
59+
60+
## Architecture & Patterns
61+
62+
### Monorepo Management
63+
- **Yarn workspaces** with workspace protocol (`"@lightsparkdev/ui": "*"`)
64+
- **Turbo** orchestrates builds with caching and parallelization
65+
- Shared configs: `@lightsparkdev/{tsconfig,eslint-config}`
66+
- Build artifacts in `dist/`, ignored by git
67+
68+
### GraphQL
69+
- TypeScript types auto-generated via GraphQL Code Generator
70+
- Schema variants per API surface (internal, third-party)
71+
- Fragments/operations defined per app
72+
- Real-time subscriptions for transaction updates
73+
- **After Python schema changes**: run `yarn gql-codegen` from root
74+
75+
### React Stack
76+
- **Vite** - Dev server and bundler
77+
- **Emotion** - CSS-in-JS styling
78+
- **React Router** - Navigation
79+
- **React Query** - Server state
80+
- **Zustand** - Client state
81+
82+
### Testing
83+
- **Jest** - Unit/integration tests
84+
- **React Testing Library** - Component tests
85+
- **Cypress** - E2E tests
86+
- Tests colocated with source (`.test.ts`, `.spec.ts`)
87+
88+
## Configuration Files
89+
90+
- **turbo.json** - Build pipeline, task dependencies, caching
91+
- **package.json** (root) - Workspace definitions, scripts
92+
- **packages/eslint-config/** - Shared linting rules
93+
- **packages/tsconfig/** - TypeScript presets
94+
95+
## Code Standards
96+
97+
- **TypeScript strict mode** enabled
98+
- **ESLint** extends shared configs
99+
- **Prettier** with import organization
100+
- **Circular dependency detection** via madge
101+
- **Prefer Edit tool** over inline rewrites for existing code
102+
103+
## Common Task Workflows
104+
105+
### Adding New Package
106+
1. Create directory in `packages/` or `apps/`
107+
2. Add workspace reference in root `package.json`
108+
3. Create `package.json` with dependencies (use workspace protocol for internal deps)
109+
4. Add build config to `turbo.json` if needed
110+
5. Run `yarn` to link workspace
111+
112+
### GraphQL Type Updates
113+
After Python backend schema changes:
114+
```bash
115+
yarn gql-codegen # All workspaces
116+
yarn workspace @lightsparkdev/uma-bridge gql-codegen # Specific app
117+
```
118+
119+
### Debugging Build Issues
120+
```bash
121+
yarn clean-all # Remove dist/ and caches
122+
yarn build --force # Bypass Turbo cache
123+
yarn clean-resolve # Nuclear option: reset lockfile
124+
```
125+
126+
### UMA Bridge Development
127+
```bash
128+
# Lint bridge + UI package
129+
yarn run lint --filter=@lightsparkdev/ui --filter=@lightsparkdev/uma-bridge
130+
131+
# Start with Vite dev server (proxy configured for backend)
132+
yarn workspace @lightsparkdev/uma-bridge start
133+
```
134+
135+
Integrates with: Plaid, Tazapay, Striga, other payment providers
136+
137+
### Adding Dependencies
138+
```bash
139+
# Workspace-specific
140+
yarn workspace @lightsparkdev/<name> add <package>
141+
142+
# Root-level (affects all workspaces)
143+
yarn add -W <package>
144+
```
145+
146+
## Release Process
147+
148+
**Public packages** (SDK, core utilities):
149+
- Changesets for version management
150+
- Copybara syncs to public repo on main merge
151+
- Release PR auto-created
152+
- Merge Release PR → npm publish
153+
154+
**Private packages** (`packages/private/`, `apps/private/`):
155+
- Not published to npm
156+
- Versioned internally only
157+
158+
## Troubleshooting
159+
160+
**Import errors**: Check workspace dependencies use `"*"` not version numbers
161+
**Type errors after GraphQL changes**: Run `yarn gql-codegen`
162+
**Stale build artifacts**: `yarn clean-all && yarn build`
163+
**Turbo cache issues**: Add `--force` flag to bypass cache

0 commit comments

Comments
 (0)