Skip to content

Conversation

ehegnes
Copy link
Contributor

@ehegnes ehegnes commented Sep 2, 2025

No description provided.

Copy link

vercel bot commented Sep 2, 2025

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
site Ignored Ignored Preview Sep 2, 2025 6:14am

Copy link

github-actions bot commented Sep 2, 2025

App 2 🤌

⚡️ Visit your deployment at https://e381933c.app2-9yo.pages.dev
⚡️ Check the deployment details on the Cloudflare dashboard: https://dash.cloudflare.com/edb70a4ee98ecd385f020b2f042ed641/pages/view/app2/e381933c-d134-406d-b939-86ac2c458277


Signed-off-by: Eric Hegnes <eric@hegnes.com>
@ehegnes ehegnes marked this pull request as ready for review September 2, 2025 06:16
Comment on lines +51 to +56
dailyTransfers.data = pipe(
data,
Option.map(flow(
Struct.get("v2_stats_transfers_daily_count"),
A.sortBy(orderDailyTransfer),
)),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These arrays are now sorted ascending by date.

Comment on lines +48 to +70
cumData = $derived(
pipe(
Option.all([this.data, statistics.totalTransfers]),
Option.map(([xs, total]) => {
const rev = A.reverse(xs)
return pipe(
rev,
I.scan(total, (acc, { count }) => acc - count),
I.zip(rev),
I.map(([count, { day_date }]) => ({
count,
day_date,
})),
A.fromIterable,
A.reverse,
x => {
console.log({ x })
return x
},
)
}),
),
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We count backwards from the total, accumulating intermediate totals.

@@ -75,9 +75,10 @@ const displayPacketDay = $derived.by(() => {
})

onMount(() => {
const DAYS = 100
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the limit allowed by the queries.

@cor cor merged commit f26d31d into main Sep 2, 2025
131 checks passed
@unionlabs unionlabs deleted a comment from ANONKOJO Sep 2, 2025
@cor cor deleted the app-cum branch September 2, 2025 07:06
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.

2 participants