Skip to content

Development#28

Merged
carnach merged 33 commits into
releasefrom
development
Feb 9, 2026
Merged

Development#28
carnach merged 33 commits into
releasefrom
development

Conversation

@carnach
Copy link
Copy Markdown
Owner

@carnach carnach commented Feb 9, 2026

No description provided.

carnach and others added 30 commits February 4, 2026 21:13
Add database-backed session storage to fix session expiration on server restart

- Create AnonymousSession table with token, userId, expiresAt, and challenge fields

- Replace in-memory Map with Prisma queries in SessionStore

- Sessions now persist across server restarts and deployments

Fix group recovery and sign-out behavior

- Fix naming conflict between setRecentGroups state setter and helper function

- Groups now properly save to localStorage when logging in

- Sign-out only clears localStorage, preserving groups in database for recovery

- Groups restore automatically when logging back in with same account

Improve UI for logged-in users

- Move Restore from backup and Import from JSON to account dropdown menu

- Hide restore/import options from groups page for logged-in users

- Better organization of account management features

Add server-side authorization to group deletion

- Validate user session before allowing group deletion

- Verify group ownership through anonymousUserGroup table

- Return appropriate error codes (401 UNAUTHORIZED, 403 FORBIDDEN)

- Prevents unauthorized deletion even if UI is bypassed
Add ability to register multiple passkeys per anonymous account with custom names

- Create new Passkey table with name, credentialId, publicKey, counter, lastUsedAt fields

- Migrate from single passkey storage on AnonymousUser to separate Passkey table

- Add passkey name input dialog when registering new passkeys

- Display list of all registered passkeys with creation dates

- Add individual passkey deletion with confirmation dialog

- Update lastUsedAt timestamp when passkey is used for authentication

- Add /api/anonymous-users/passkey/list endpoint to fetch user's passkeys

- Maintain backward compatibility with deprecated passkey fields on AnonymousUser

UI improvements:

- Show passkey list with name and creation date in account dialog

- Add 'Add passkey' button that opens name input dialog

- Individual remove button for each passkey

- Better UX with 'New account' button highlighted when generating username

- Changed 'Recover account' to 'Existing account' for clarity
- Change auth-options endpoint to fetch credentials from Passkey table
- Support multiple passkeys by returning all credential IDs for allowCredentials
- Fixes 'No passkey registered' error when authenticating
- Add upsert to create AnonymousUser if not exists before session creation
- Prevents foreign key constraint violation in AnonymousSession table
- Handle both authenticated and discoverable credential flows
…set flows

- Always require current passphrase for normal passphrase change
- Add separate reset flow for passkey-authenticated users
- Reset with passkey only requires new passphrase (no current)
- Add hasPassphrase flag to groups API response
- Update UI to conditionally show options based on passphrase state
- Add passkeyResetMode state to differentiate between change and reset
- Server-side validation enforces security requirements
…nup optimization (#20)

* Initial plan

* Address code review comments: fix security and reliability issues

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

* Refactor: extract session retrieval helper and add temp user cleanup

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

* Improve error messages and add error logging for debugging

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

* Polish error message for clarity

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>
…rt (#22)

* Initial plan

* Add security improvements to remote JSON import route

- Add rate limiting to prevent SSRF abuse
- Add timeout (30s) to fetch operations
- Add groupId validation to prevent injection/path traversal
- Add SSRF protection (block private IPs, localhost, metadata endpoints)
- Add response size limit (10MB) and max expenses limit (10k)
- Add error handling to normalizeDate function
- Improve error logging in import-json-button.tsx
- Extract ASSOCIATED_GROUPS_KEY constant to shared file

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

* Translate import success messages to all supported languages

- pt-BR: Portuguese (Brazil)
- ru-RU: Russian
- ko: Korean
- id: Indonesian
- fr-FR: French
- zh-TW: Chinese Traditional
- ro: Romanian
- ja-JP: Japanese
- eu: Basque
- zh-CN: Chinese Simplified
- nl-NL: Dutch
- he: Hebrew
- cs-CZ: Czech
- uk-UA: Ukrainian
- tr-TR: Turkish
- pt: Portuguese
- pl-PL: Polish
- es: Spanish
- de-DE: German
- ca: Catalan
- fi: Finnish
- it-IT: Italian

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

* Address code review feedback on security improvements

- Fix IP validation to properly handle octets and validate ranges
- Remove redundant cloud metadata endpoint check (covered by link-local)
- Fix normalizeDate to throw error instead of using epoch as default
- Filter out expenses with invalid dates instead of setting to epoch
- Sanitize logging to avoid exposing sensitive data

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

* Fix log injection vulnerability in normalizeDate

Use template literal instead of string concatenation to prevent
potential log injection when logging the type of invalid date values.

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>
… import (#24)

* Initial plan

* Address code review feedback: SSRF protection, translations, and error handling

- Add protocol validation (http/https only) to validateRemoteUrl
- Enforce hard byte limit while reading response in fetchTrpcJson
- Prevent redirect-based SSRF by setting redirect: 'manual'
- Add all missing translation keys for hardcoded UI strings
- Change placeholder URL from spliit.app to neutral example.com
- Wrap syncAssociatedGroups in try/catch for best-effort handling
- Improve passkey error handling to differentiate error types (rate limit, not found, user cancel)
- Run prettier to fix inconsistent indentation

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>
…#25)

* Initial plan

* Fix duplicate imports in import-json-button.tsx

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>
* Initial plan

* Address PR review comments: fix unused imports, update links, improve security and error handling

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

* Improve icon choice and clarify HTML stripping behavior

Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: carnach <26198260+carnach@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 9, 2026 12:30
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 9, 2026

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

Project Deployment Actions Updated (UTC)
my-spliit-instance Ready Ready Preview, Comment Feb 9, 2026 0:40am

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a Node-based icon generation script and wires it into the project tooling to (re)generate PWA/logo assets while archiving previous outputs.

Changes:

  • Added scripts/generate-icons.mjs to generate PNG icons (via pwa-asset-generator with a sharp fallback) and create an archived snapshot of prior assets.
  • Added an npm script (generate-icons) and the pwa-asset-generator dependency.
  • Committed two archived logo.svg snapshots under public/logo-archive/....

Reviewed changes

Copilot reviewed 2 out of 44 changed files in this pull request and generated no comments.

File Description
scripts/generate-icons.mjs Implements icon generation, fallback resizing, and asset archiving.
package.json Adds generate-icons script and pwa-asset-generator dependency.
public/logo-archive/2026-02-09T11-57-04-189Z/logo.svg Adds an archived SVG version of the logo.
public/logo-archive/2026-02-09T11-47-13-777Z/logo.svg Adds another archived SVG snapshot of the prior logo.
Comments suppressed due to low confidence (2)

scripts/generate-icons.mjs:1

  • Falling back to npx without --no-install can unexpectedly download/execute packages from the registry if the local binary is missing, which is risky and can make builds non-reproducible. Prefer either (a) failing fast with an actionable error when localBin is missing, or (b) using npx --no-install pwa-asset-generator ... so only locally installed dependencies are used.
    scripts/generate-icons.mjs:1
  • The warning drops the underlying failure reason, which will make diagnosing CI/local issues harder (e.g., missing binary vs runtime error). Include the caught error message/exit code in the warning (or rethrow after fallback if certain failures should be fatal).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@carnach carnach merged commit 3c939c0 into release Feb 9, 2026
2 checks passed
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.

3 participants