Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
71435de
feat: begin move to remote functions
jhechtf Sep 18, 2025
fbbab4c
chore: Card component, bills/household edits, layout, and turbo dev flag
jhechtf Mar 22, 2026
ad2ab77
chore: upgrade SvelteKit, Svelte, Vite, and related packages
jhechtf Mar 22, 2026
92ff009
feat: migrate dashboard page to async remote functions
jhechtf Mar 23, 2026
37598e2
feat: migrate bills pages to async remote functions
jhechtf Mar 23, 2026
1ee1628
feat: migrate payments pages to async remote functions
jhechtf Mar 23, 2026
8a42c4c
feat: migrate household layout and pages to async remote functions
jhechtf Mar 23, 2026
7796f46
chore: remove deprecated server load infrastructure after remote func…
jhechtf Mar 23, 2026
1c0c09c
chore: format and fix lint warnings across migrated files
jhechtf Mar 23, 2026
b167186
chore: Card component, bills/household edits, layout, and turbo dev flag
jhechtf Mar 22, 2026
20b39c8
chore: upgrade SvelteKit, Svelte, Vite, and related packages
jhechtf Mar 22, 2026
7771451
feat: migrate dashboard page to async remote functions
jhechtf Mar 23, 2026
f717d08
feat: migrate bills pages to async remote functions
jhechtf Mar 23, 2026
55b1e0a
feat: migrate payments pages to async remote functions
jhechtf Mar 23, 2026
c9d3e6b
feat: migrate household layout and pages to async remote functions
jhechtf Mar 23, 2026
075284b
chore: remove deprecated server load infrastructure after remote func…
jhechtf Mar 23, 2026
0a9f9b8
chore: format and fix lint warnings across migrated files
jhechtf Mar 23, 2026
4096bd0
Merge branch 'chore/misc-improvements' of github.com:sungmanito/mono …
jhechtf May 23, 2026
4fa0097
random updates
jhechtf May 25, 2026
81b750a
fix: fix stuff from coderabbit.
jhechtf May 27, 2026
04776a2
updates bills modal to work properly
jhechtf May 30, 2026
8cc5064
fix: random bug with upcoming payments
jhechtf May 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install PNPM
with:
version: 9.0.5
- uses: actions/setup-node@v4
with:
node-version: '22.x'
Expand All @@ -24,8 +22,6 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install PNPM
with:
version: 9.0.5
- uses: actions/setup-node@v4
with:
node-version: '22.x'
Expand Down
54 changes: 27 additions & 27 deletions apps/website/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
import typescript from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import svelte from "eslint-plugin-svelte";
import svelteParser from "svelte-eslint-parser";
import typescript from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import svelte from 'eslint-plugin-svelte';
import svelteParser from 'svelte-eslint-parser';

export default [
{
ignores: [
"**/build/**",
"**/coverage/**",
"**/drizzle/**",
"**/test-results/**",
"**/node_modules/**",
"**/.svelte-kit/**",
"**/.vercel/**",
'**/build/**',
'**/coverage/**',
'**/drizzle/**',
'**/test-results/**',
'**/node_modules/**',
'**/.svelte-kit/**',
'**/.vercel/**',
],
},
{
files: ["**/*.ts", "**/*.tsx", "**/*.js"],
files: ['**/*.ts', '**/*.tsx', '**/*.js'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
project: './tsconfig.json',
sourceType: 'module',
ecmaVersion: 2022,
},
},
plugins: {
"@typescript-eslint": typescript,
'@typescript-eslint': typescript,
},
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
},
},
{
files: ["**/*.svelte"],
files: ['**/*.svelte'],
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: tsParser,
project: "./tsconfig.json",
extraFileExtensions: [".svelte"],
project: './tsconfig.json',
extraFileExtensions: ['.svelte'],
},
},
plugins: {
svelte: svelte,
"@typescript-eslint": typescript,
'@typescript-eslint': typescript,
},
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
},
},
Expand Down
12 changes: 6 additions & 6 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"@storybook/test": "8.6.14",
"@storybook/test-runner": "^0.23.0",
"@sungmanito/skeleton-plugin": "workspace:*",
"@sveltejs/adapter-vercel": "^4.0.5",
"@sveltejs/kit": "^2.47.0",
"@sveltejs/vite-plugin-svelte": "^6.2.1",
"@sveltejs/adapter-vercel": "^6.3.3",
"@sveltejs/kit": "^2.55.0",
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"@tailwindcss/container-queries": "^0.1.1",
"@tailwindcss/forms": "^0.5.10",
"@testing-library/jest-dom": "^6.6.3",
Expand All @@ -58,13 +58,13 @@
"sass": "^1.89.2",
"storybook": "9.1.1",
"supabase": "^1.226.4",
"svelte": "^5.36.5",
"svelte": "^5.54.1",
"svelte-check": "^4.2.2",
"tailwindcss": "^3.4.17",
"tslib": "^2.8.1",
"typescript": "^5.8.3",
"vite": "^7.1.10",
"vitest": "^1.6.1"
"vite": "^8.0.1",
"vitest": "^4.1.0"
},
"type": "module",
"dependencies": {
Expand Down
40 changes: 36 additions & 4 deletions apps/website/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
// lightningcss 1.32.0 incorrectly rejects some ::file-selector-button selectors

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.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix Prettier formatting to unblock CI.

The pipeline is failing because Prettier has detected code style issues in this file. Run prettier --write apps/website/postcss.config.cjs to fix the formatting.

🧰 Tools
🪛 GitHub Actions: Pr Checks / 1_formatter.txt

[warning] 1-1: Prettier --check reported code style issues in this file. Run 'prettier --write' to fix.

🪛 GitHub Actions: Pr Checks / formatter

[warning] 1-1: Prettier: code style issues found. Run 'prettier --write' to fix.


[error] 1-1: Step 'pnpm prettier:check' failed because 'prettier . --check' reported formatting issues (exit code 1).

🤖 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 `@apps/website/postcss.config.cjs` at line 1, Prettier formatting errors in
apps/website/postcss.config.cjs are causing CI to fail; run the formatter
(prettier --write apps/website/postcss.config.cjs) to reformat the file, ensure
the file header comment ("// lightningcss 1.32.0 incorrectly rejects some
::file-selector-button selectors") and surrounding whitespace match Prettier's
output, then stage and commit the updated file so the CI lint/prettier check
passes.

// generated by @tailwindcss/forms. This plugin normalizes them before minification.
const USER_ACTION_PSEUDOS = new Set([':hover', ':active', ':focus', ':focus-within', ':focus-visible']);

const fixFileSelectorButton = () => ({
postcssPlugin: 'fix-file-selector-button',
Rule(rule) {
if (!rule.selector.includes('::file-selector-button')) return;

// Remove rules with a combinator after ::file-selector-button — truly invalid CSS.
if (/::file-selector-button\s*[>~+]/.test(rule.selector)) {
rule.remove();
return;
}

// Move any non-user-action pseudo-classes from after ::file-selector-button to before it.
// e.g. ::file-selector-button:disabled → :disabled::file-selector-button
// ::file-selector-button:disabled:hover → :disabled:hover::file-selector-button
Comment on lines +16 to +18

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Correct the comment example.

The example on line 18 is inconsistent with the actual code behavior. Based on the logic in lines 23-25, user-action pseudo-classes (:hover) remain after ::file-selector-button, while only non-user-action pseudo-classes are moved before it.

The actual transformation for ::file-selector-button:disabled:hover would be:

  • Input: ::file-selector-button:disabled:hover
  • Output: :disabled::file-selector-button:hover (not :disabled:hover::file-selector-button)
📝 Proposed fix for the comment
   // Move any non-user-action pseudo-classes from after ::file-selector-button to before it.
   // e.g. ::file-selector-button:disabled       → :disabled::file-selector-button
-  //      ::file-selector-button:disabled:hover → :disabled:hover::file-selector-button
+  //      ::file-selector-button:disabled:hover → :disabled::file-selector-button:hover
🤖 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 `@apps/website/postcss.config.cjs` around lines 16 - 18, Update the comment
example that shows the transformation of ::file-selector-button:disabled:hover
to match the implemented logic (only non-user-action pseudo-classes are moved
before ::file-selector-button while user-action pseudo-classes like :hover
remain after). Replace the incorrect example
(::file-selector-button:disabled:hover → :disabled:hover::file-selector-button)
with the correct result (::file-selector-button:disabled:hover →
:disabled::file-selector-button:hover), referencing the ::file-selector-button
selector and the distinction between non-user-action pseudo-classes (e.g.,
:disabled) and user-action pseudo-classes (e.g., :hover) so the comment aligns
with the code handling in the block that reorders pseudo-classes.

rule.selector = rule.selector.replace(
/(::file-selector-button)((?::[a-z-]+)+)/g,
(_, pseudoEl, pseudoClasses) => {
const classes = pseudoClasses.match(/:[a-z-]+/g) || [];
const before = classes.filter((c) => !USER_ACTION_PSEUDOS.has(c));
const after = classes.filter((c) => USER_ACTION_PSEUDOS.has(c));
return before.join('') + pseudoEl + after.join('');
},
);
},
});
fixFileSelectorButton.postcss = true;

module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
fixFileSelectorButton,
],
};
4 changes: 4 additions & 0 deletions apps/website/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
top: 0;
left: 0;
}

.no-scroll {
overflow: hidden;
}
2 changes: 0 additions & 2 deletions apps/website/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
import type { getUserHouseholds } from '$lib/server/actions/households.actions';
import { SupabaseClient, type Session } from '@supabase/supabase-js';
import type { PostHog } from 'posthog-node';
declare global {
Expand All @@ -14,7 +13,6 @@ declare global {
supabase: SupabaseClient;
getSession: () => Promise<Session | null>;
config: VercelConfig;
userHouseholds: Awaited<ReturnType<typeof getUserHouseholds>>;
posthog: PostHog;
}
// interface PageData {}
Expand Down
18 changes: 5 additions & 13 deletions apps/website/src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import {
POSTHOG_API_KEY,
} from '$env/static/private';
import { PUBLIC_SUPABASE_URL } from '$env/static/public';
import { getUserHouseholds } from '$lib/server/actions/households.actions';
import { validateUserSession } from '$lib/util/session';
import { createServerClient } from '@supabase/ssr';
import { redirect, type Handle } from '@sveltejs/kit';
import { PostHog } from 'posthog-node';
Expand All @@ -27,10 +25,13 @@ export const handle: Handle = async ({ event, resolve }) => {
cookies: {
get: (key) => event.cookies.get(key),
set: (key, value, options) => {
event.cookies.set(key, value, options);
event.cookies.set(key, value, {
...options,
path: options.path ?? '/',
});
},
remove: (key, options) => {
event.cookies.delete(key, options);
event.cookies.delete(key, { ...options, path: options.path ?? '/' });
},
},
},
Expand Down Expand Up @@ -63,15 +64,6 @@ export const handle: Handle = async ({ event, resolve }) => {
redirect(303, `/login?url=${event.url.pathname}`);
}

// We are gathering the logged in users' households a lot
// To hopefully save that, we store them in the locals.
if (validateUserSession(session)) {
console.info('Gathering user households');
event.locals.userHouseholds = await getUserHouseholds(session.user.id);
} else {
event.locals.userHouseholds = [];
}

return resolve(event, {
filterSerializedResponseHeaders(name) {
return name === 'content-range';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
const { Story } = defineMeta({
title: 'Components/Button Group',
component: ButtonGroup,
tags: ['autodocs'],
});

let fn = $state('Option 1');
Expand Down
64 changes: 64 additions & 0 deletions apps/website/src/lib/components/card/card.stories.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<script lang="ts" module>
import Button from '$components/button/button.svelte';
import Card from './card.svelte';
import { defineMeta } from '@storybook/addon-svelte-csf';
import { PencilIcon } from 'lucide-svelte';
const { Story } = defineMeta({
title: 'Components/Cards',
component: Card,
args: {
children: defaultChildren,
},
tags: ['autodocs'],
});
</script>

{#snippet defaultChildren()}
<div class="p-4">Card content</div>
{/snippet}

<Story
name="Default"
parameters={{
docs: {
description: {
story: 'your mother',
},
},
}}
/>

<Story name="Summary Card" asChild>
<Card
headerClasses="justify-between flex pb-4 items-center"
class="w-1/5 variant-filled-surface text-on-surface-token"
>
{#snippet header()}
<div>Summary info</div>
<div>
<PencilIcon size="1em" />
</div>
{/snippet}
<div class="p-4 text-center text-3xl font-bold">0</div>
</Card>
</Story>

<Story name="Card with Image" asChild>
<Card overrideClasses={{ header: true }} class="w-2/5">
{#snippet header()}
<img
src="https://placekittens.com/600/400"
alt="Placekitten"
class="w-full h-auto rounded-tl-container-token rounded-tr-container-token"
/>
{/snippet}

{#snippet footer()}
<div class="flex gap-4 border-t pt-4 border-surface-400">
<Button>Adopt</Button>
</div>
{/snippet}

<div class="p-4">This is Whiskers. He's a wanted criminal in 7 states.</div>
</Card>
</Story>
48 changes: 48 additions & 0 deletions apps/website/src/lib/components/card/card.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<script lang="ts" module>
import type { Snippet } from 'svelte';
import type { ClassValue } from 'svelte/elements';

export type CardProps = {
header?: Snippet<[]>;
footer?: Snippet<[]>;
children?: Snippet<[]>;
headerClasses?: ClassValue;
footerClasses?: ClassValue;
class?: ClassValue;
overrideClasses?: {
header?: boolean;
footer?: boolean;
};
};
</script>

<script lang="ts">
let {
header,
footer,
children,
class: classValue,
headerClasses = '',
footerClasses = '',
overrideClasses = {
header: false,
footer: false,
},
}: CardProps = $props();
</script>

<div class={['card', classValue]}>
{#if header}
<div class={[{ 'card-header': !overrideClasses.header }, headerClasses]}>
{@render header()}
</div>
{/if}
{#if children}
{@render children()}
{/if}
{#if footer}
<div class={[{ 'card-footer': !overrideClasses.footer }, footerClasses]}>
{@render footer()}
</div>
{/if}
</div>
2 changes: 0 additions & 2 deletions apps/website/src/lib/components/chart/chart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
}
};
});

$inspect(chartInstance);
</script>

<div>
Expand Down
Loading
Loading