Moving reminder logic out of Expo made one failure mode obvious

I'm building Flowy, a health tracking app, and the current local-reminder code is split into two parts.

The planner is a pure function. It takes settings and dates and returns identifiers, copy, dates, hours, and repeat flags. A thin Expo adapter asks for permission, cancels the old schedule, and schedules the new plan.

That makes the planner easy to preview and test. It also makes the risky part clearer: cancel-all plus a partial scheduling failure can leave only part of the new plan active.

The useful lesson wasn't just "pure functions test better." Separating the side effects showed exactly where recovery still needs work.

reddit.com
u/Particular_Luck80 — 2 days ago

Do you dynamically import iOS-only native modules or keep a stub adapter?

In an Expo React Native app, I have an optional HealthKit adapter. Android returns a no-op adapter immediately. On iOS, the request and read methods dynamically import the native package inside try/catch, so a missing native module becomes false or an empty array instead of crashing the app at startup.

The upside is a safe manual fallback. The downside is that a packaging mistake can look exactly like a user declining access or HealthKit being unavailable unless I surface a separate diagnostic.

Would you keep the dynamic import boundary, or fail loudly in development and only fall back in release builds?

reddit.com
u/Particular_Luck80 — 2 days ago
▲ 1 r/expo+1 crossposts

I moved Flowy’s mobile app from SwiftUI to Expo. The risky part wasn’t the screens

I’m building Flowy, a cycle-health app. I recently replaced the native iOS project with an Expo and React Native app.

The screens were the easy part. The risky bits are session restoration, onboarding drafts, owner-scoped day-log caches, notification planning, HealthKit being unavailable, and retrying a write without duplicating it.

I kept those decisions in small TypeScript stores and route functions, with tests around routing, auth, day-log retries, notifications, and HealthKit fallback before polishing the UI.

No link here. I’m looking for engineering feedback: if you’ve done a mobile rewrite, which behavior broke after the happy path looked finished?

reddit.com
u/Particular_Luck80 — 2 days ago

Do you reuse an avatar object path or delete the previous upload?

I'm using Expo ImagePicker and Supabase Storage for avatars in a React Native app.

The current path is {userID}/avatar/{timestamp}.jpg, then I insert a media row. Uploading with upsert: true looks like replacement, but because every path is new, old files remain unless I delete them separately.

I'm deciding between:

- one stable avatar.jpg key with cache-busting metadata

- immutable versioned keys, update the pointer, then delete the previous object after the database write succeeds

- keep a short version history and clean it in the background

The stable key is simpler, but caches can show the old photo. Versioned keys are clearer, but cleanup becomes part of the transaction. Which pattern has been less fragile for you on mobile?

reddit.com
u/Particular_Luck80 — 4 days ago

Do you replace every local notification schedule or diff it?

I'm working through local reminder rescheduling in a React Native app. The reminder dates come from settings the user can edit later.

Right now the flow is:

- calculate the full next schedule

- cancel every scheduled notification

- recreate each one with a stable identifier

It avoids orphaned reminders after the source date changes. But if scheduling fails halfway through, the user can end up with only part of the new set.

Would you keep the simple replace-all model and add recovery, or diff old and new schedules by identifier? I'm using Expo Notifications.

reddit.com
u/Particular_Luck80 — 5 days ago

What should happen to an offline mutation after the server reset its data?

I’m working through an offline queue edge case in React Native.

A write is saved locally with an expected server version and reset epoch. If the request times out, retrying with the same mutation ID is safe. But if the user resets their server data before the queue flushes, that old write must not quietly come back.

My current rule is:

- keep the same mutation ID after a lost response

- compare the reset epoch on every retry

- reject queued work from an older epoch

- keep local intent over stale reads only while the queue item is still valid

The tricky part is UX. Dropping the stale write is safer, but hiding it feels wrong. Would you show a persistent “couldn’t sync” item, a one-time alert, or a recoverable draft?

reddit.com
u/Particular_Luck80 — 5 days ago

Reduced Motion should never control app logic. How are you testing this in React Native?

A pattern worth checking: a screen waits for an animation-completion callback before it updates state or enables the next action. It works until iOS Reduce Motion skips or changes that animation.

I now treat motion as presentation only. The state change happens independently, then the animation reflects it. If reduced motion is enabled, movement can disappear without changing navigation, loading, focus, or button availability.

For React Native, I’m testing both the normal and reduced-motion branches around:

- navigation transitions

- delayed mounts

- sheets and modals

- focus after validation

- callbacks that previously fired at animation end

I’m curious how others automate this. Do you mock AccessibilityInfo.isReduceMotionEnabled in unit tests, cover it in Detox, or both?

reddit.com
u/Particular_Luck80 — 5 days ago
▲ 2 r/IMadeThis+1 crossposts

A date-only field should not become a local-time timestamp

I’m building a browser-based health calculator suite, and a small JavaScript date choice turned into a correctness boundary.

An input type=date gives a calendar date. It does not give a moment in time. If that string becomes a local Date, midnight, timezone offsets, or a daylight-saving transition can move formatting or arithmetic onto an adjacent day.

In Flowy’s calculator engine, 2026-08-09 is parsed with Date.UTC. Every calculation adds whole UTC days, and formatting pins the timezone to UTC. Invalid calendar inputs such as 30 February are rejected by comparing the reconstructed UTC fields.

That keeps date-only semantics through period ranges, pregnancy dating, and calendar exports. The same rule is covered by a test that parses a date and expects the identical ISO date back.

The tradeoff is deliberate: these are calendar calculations, not event timestamps. If the domain later needs an actual appointment time, that should be a separate type with a timezone.

The calculators run in the browser, and the current methods are here: https://flowyhealth.com/tools

This feels bigger than health software. Birthdays, billing dates, hotel stays, and deadlines can all break when a calendar date is treated as an instant.

How are you representing date-only values in your product: ISO strings, Temporal.PlainDate, or a UTC-based wrapper?

u/Particular_Luck80 — 5 days ago

Self-hosted Durable Objects move coordination into object storage

celld is a new open-source attempt to run the Workers and Durable Objects model on your own machines. The useful detail is where coordination lives.

Each named cell has one current owner, a V8 isolate, and a SQLite database. The fleet shares an S3-compatible bucket. A compare-and-swap operation in that bucket decides ownership, while an epoch fences an old owner after a lease changes. The same bucket stores deployments, replicated state, leases, and peer-auth material.

So the design does not make distributed coordination disappear. It moves the control-plane boundary into object storage. That makes nodes replaceable, but bucket credentials become fleet administrator credentials rather than ordinary backup access.

The operational tradeoff is explicit. celld's peer HTTP does not terminate TLS, so advertised addresses need a trusted private network or encrypted overlay. The project also says it is alpha and not safe for hostile multi-tenant workloads. Its Cloudflare compatibility covers a focused Workers and Durable Objects surface, not KV, R2 bindings, Cache, Workers AI, or the rest of the platform.

I like that boundary because it makes self-hosting concrete. You gain control over placement and failure handling, but you also own bucket consistency, credential scope, peer networking, ingress, monitoring, and recovery tests.

Project: https://celld.dev/

Source: https://github.com/denoland/celld

Security notes: https://celld.dev/docs/security/

For teams already comfortable operating object storage as a source of truth, does this feel simpler than a separate membership and consensus layer, or does it only move the hardest dependency?

u/Particular_Luck80 — 12 days ago

A predicted date should stay tentative after it leaves your app

I added a calendar export to a period calculator and nearly missed a semantics problem: moving an estimate into someone’s calendar can make it look more certain than it was inside the app.

The export is generated locally in the browser. Each predicted period becomes an all-day event with the summary "Estimated period (Flowy)". The event is also marked STATUS:TENTATIVE and TRANSP:TRANSPARENT, so it remains visibly provisional and does not block the person’s availability.

The description repeats the boundary: it is a tentative planning estimate, not medical advice or birth control. The page also warns that the user’s chosen calendar provider may sync those events after import. That handoff matters even though Flowy never receives the dates used by the calculator.

I added a test that checks the event count, start and end dates, and tentative status. The date arithmetic uses UTC-only calendar dates so an import cannot quietly move an event to the previous day because of timezone or daylight-saving behavior.

The broader lesson for me is that uncertainty has to survive every export. A careful label in your UI is not enough if the CSV, PDF, webhook, or calendar file turns the same value into a fact.

Project context: https://flowyhealth.com/tools/period-calculator

Where have you seen an export format accidentally make uncertain data look authoritative?

reddit.com
u/Particular_Luck80 — 12 days ago

Playwright reached 100%, but the browser executable was still missing

I hit an odd Playwright installation failure on macOS that looked like a completed install.

Setup:

- Playwright 1.58.2

- Node 24.16.0

- pnpm

- Chromium headless shell

I ran:

```sh

pnpm exec playwright install chromium --only-shell --force

```

The 91.1 MiB archive reached 100% within seconds. Then the command stayed open with no success message or prompt for another 5 to 10 minutes.

The network was not the problem. The ZIP was valid and fully downloaded. The Node child process running `oopDownloadBrowserMain.js` was idle at 0% CPU, while extraction had stopped partway through Playwright's cache directory.

One detail made the state more confusing: `playwright install --list` showed the browser cache directory even though the `chrome-headless-shell` executable was missing. A cache entry was not the same as a usable install.

The useful check was the artifact itself:

```sh

test -x <cache-path>/chrome-headless-shell

```

For this local run, I preserved the valid ZIP, stopped the stuck installer, extracted the archive into Playwright's expected macOS cache directory, restored executable permission, and added the completion marker. The executable check then passed, and the same focused E2E run finished with 3 passing tests and 0 flaky tests.

The debugging lesson for me is that 100% meant downloaded, not ready. For browser tooling, I now want to verify three separate states: the archive exists, the executable exists, and the browser launches.

Playwright's browser installation docs: https://playwright.dev/docs/browsers

I also found a similar macOS arm64 report using Node 24.16.0: https://github.com/microsoft/playwright-cli/issues/419

That similarity does not prove the same root cause. Has anyone traced whether this symptom comes from Playwright's extraction and finalization path or from Node 24 child-process behavior?

u/Particular_Luck80 — 12 days ago
▲ 6 r/ChatGPTCoding+2 crossposts

Portable agent plugins should standardise packaging, not trust

Agent Plugins appeared on Hacker News newest today. The useful part is narrower than “one plugin format wins.”

The 1.0 working draft defines a small portable package: a root plugin.json, skills discovered from immediate children of skills/, and optional MCP server configuration. It explicitly leaves distribution, installation, permissions, and user experience to each client.

That boundary matters. A portable manifest can describe what a package contains, but it should not grant the package authority to run everything it declares.

One concrete safeguard in the draft is path containment. Files and directories discovered through the package must resolve inside the plugin root. Plugin-relative paths begin with ./, and a symlink or equivalent escape outside the root must be rejected.

This does not solve plugin security. A client still has to decide which tools can run, what network access is allowed, how secrets are provided, and when a person must approve an action. Portability removes duplicated packaging. It does not remove local trust decisions.

Source: https://agent-plugins.org/specification

If this format becomes widely supported, which behaviour should remain client-specific: permissions, installation review, secret handling, or all three?

u/Particular_Luck80 — 1 day ago

Coding-agent edits should be admitted like a transaction

I found JAIPilot on Hacker News newest today. It wraps Codex or Claude Code with a local control plane for Java tests and cleanup, but the useful idea is broader than Java.

The workflow separates generation from admission.

Every run starts with a clean build, snapshots the live source, creates an isolated workspace, and records the exact targets. The agent edits only that workspace. Validation then enforces the allowed scope, runs another clean build, checks that changed tests actually executed from fresh test reports, and can use coverage and mutation evidence.

The drift checks are the detail I like. Validation snapshots the candidate and rejects source written by build steps. Apply requires the candidate to match the immediately validated snapshot, while the live source must still match its original snapshot. Only allowlisted files are written back. Discard leaves the real tree unchanged.

That suggests a practical boundary for coding agents: let the model propose changes in isolation, but make admission to the real repository a deterministic step based on scope, build output, and fresh evidence.

There is more ceremony. But the failure mode becomes "candidate rejected before apply" instead of "agent edited an unrelated file and we noticed later."

Source: https://github.com/JAIPilot/jaipilot/blob/main/docs/how-it-works.md

What evidence do you require before an agent-generated candidate can enter the real worktree?

reddit.com
u/Particular_Luck80 — 15 days ago

A second AI model is not automatically an independent code reviewer

I found a paper on Hacker News that tested a workflow a lot of us now use: one coding agent writes, another reviews.

The experiment used 116 medium and hard LiveCodeBench tasks across solo, same-model, and cross-model conditions. The reviewer saw the problem and the draft, but could not run tests.

The direction mattered. Claude reviewing Codex drafts raised the pass rate from 71.6% to 89.7%. Codex reviewing Claude drafts lowered it from 91.4% to 82.8%. Even adding a different model can make a strong draft worse.

I don't think the takeaway is "always use Claude as reviewer." These were benchmark tasks, not repository-scale pull requests, and the reviewer lacked test execution. The useful takeaway is narrower: model diversity is not the same as independent judgement.

For a real workflow, I'd measure each writer-reviewer pairing, keep reviewer changes visible as a diff, and require tests before accepting the rewrite. Otherwise a second agent can add confidence without adding correctness.

Paper: https://arxiv.org/abs/2607.21656

If you use two agents, does the reviewer edit directly, or only leave findings for the writer or a human to accept?

u/Particular_Luck80 — 16 days ago
▲ 9 r/gsuite

How does Google Docs stay fast with 100–500-page documents? Seeking architecture ideas for Tiptap/ProseMirror pagination

I’m building a page-based document editor using Tiptap/ProseMirror, and performance starts falling apart once a document reaches roughly 60 pages. Typing latency rises, selection/cursor behavior becomes less reliable, pagination/reflow gets expensive, and the UI can become generally sluggish.

Google Docs, by comparison, seems able to handle documents with 100, 200, 300, 400, or even 500+ pages much more gracefully. I realize Google’s exact implementation is proprietary and has evolved over time, but I’d love to understand the architectural techniques that make this scale possible—and which of them can realistically be applied to a ProseMirror-based editor.

I’m especially interested in detailed answers from anyone who has built or profiled a large web-based document editor.

Questions I’m trying to answer:

  1. Rendering and virtualization

- Does Google Docs keep the entire document represented in the DOM, or does it render only the visible pages plus an overscan window?

- Are off-screen pages removed, replaced with height-preserving placeholders, or rendered using canvas/another custom rendering layer?

- How can an editor virtualize pages without breaking native text selection, IME composition, accessibility, browser find, copy/paste, spellcheck, and screen readers?

- In ProseMirror, can distant nodes be safely replaced by lightweight decorations/placeholders while preserving positions, mappings, selections, and transaction correctness?

- Is it better to virtualize by page, block, viewport range, or document section?

  1. Pagination and layout

- How is pagination normally implemented without measuring every node after every transaction?

- Is layout computed incrementally from the changed block forward until page boundaries become stable again?

- What data structures are useful for caching block heights, page break positions, line measurements, and cumulative offsets?

- How do mature editors handle changes near page 1 that could theoretically repaginate hundreds of later pages?

- Are explicit “page” nodes usually a mistake? Would it be better to keep one semantic document model and calculate pages as a separate layout projection?

- How should hard page breaks, tables spanning pages, images, footnotes, headers/footers, margins, and keep-with-next rules be modeled?

  1. ProseMirror/Tiptap-specific bottlenecks

- Does ProseMirror fundamentally expect one mounted EditorView for the full document, or can a large document be split across multiple views while still behaving like one editor?

- Would one EditorView per page create more problems than it solves—for example cross-page selections, history, input rules, decorations, collaboration, and position mapping?

- Which operations tend to become O(document size): DOM reconciliation, decoration mapping, plugin apply methods, NodeView updates, transaction filtering, serialization, or schema traversal?

- How can I identify plugins that scan the entire document on every keystroke?

- Are there proven patterns for keeping a single canonical ProseMirror document while rendering only a bounded window?

- At what point is ProseMirror’s DOM-based model the wrong abstraction for a Google-Docs-scale editor?

  1. State, and persistence

- Does a large editor typically keep the whole logical document client-side, or load/chunk it by section?

- How are undo/redo changes kept efficient when the document contains hundreds of pages?

- How should comments, suggestions, presence cursors, and remote selections be indexed so they don’t require full-document scans?

  1. Browser and rendering techniques

- Which parts are commonly moved to Web Workers: pagination, text measurement, parsing, collaboration, spellcheck, indexing, or serialization?

- Since workers cannot directly measure DOM layout, how do production editors divide layout work between a worker and the main thread?

- Are ResizeObserver/IntersectionObserver enough, or do they introduce their own performance problems at hundreds of pages?

- How important are CSS containment, content-visibility, requestAnimationFrame batching, idle callbacks, and avoiding synchronous layout reads?

- If canvas is used for text, how are cursor placement, selection, IME, accessibility, and copy/paste implemented?

  1. Benchmarks and debugging

- What should I measure first: input latency, long tasks, transaction time, ProseMirror view updates, forced reflow, DOM node count, heap size, GC pauses, or layout/paint time?

- Are there useful rules of thumb for maximum mounted DOM nodes/pages?

- What synthetic test documents best expose the real bottleneck: plain paragraphs, large tables, many inline marks, comments, images, or collaborative decorations?

- Are there open-source editors, talks, papers, or codebases that demonstrate large-document pagination well?

I’m not looking for Google’s proprietary source code. I’m trying to learn the system-design principles behind a responsive, paginated web editor.

If you have built something similar, I’d be very interested in:

- your document/page count and approximate node count;

- which bottleneck appeared first;

- the architecture you settled on;

- what you tried that did not work;

- whether virtualization actually helped;

- any relevant ProseMirror plugins, examples, benchmarks, or profiling techniques.

Even a high-level breakdown of how you would architect this from scratch would be extremely helpful.

reddit.com
u/Particular_Luck80 — 19 days ago
▲ 13 r/Embryologists+11 crossposts

Building a privacy-first period tracker in 2026 , how would you validate it?

Yoo!
I've been building Flowy, a privacy-first period and cycle tracking app for iPhone, and wanted to share it here as I get ready for launch.

The idea came from my girlfriend's being frustrated with existing cycle trackers: dense charts, alarmist notifications, and murky data practices.

Flowy is built around three things instead: quick, one-minute daily check-ins instead of endless fields to fill out, clear plain-language cycle and ovulation estimates instead of overwhelming graphs, and a strict no-data-selling policy, with full user control to export, reset, or delete your data anytime.

There's also a companion "Flowy Journal" with short, grounded articles on cycle basics and body literacy, aimed at being genuinely useful rather than SEO filler.

Right now I'm building in public and collecting early access sign-ups at flowyhealth.com before the iPhone launch. Would love feedback from this community, especially on positioning and how to talk about health-data privacy in a way that actually resonates rather than sounding like another disclaimer nobody reads.

u/Particular_Luck80 — 5 days ago

What all should a client proposal need to have?

Pitching a very big client tomorrow who wants to build their business from scratch and scale with us.

They need:
- branding and logo designing
- Website designing and development ecom
- packaging and labelling
- handling their paid ads accounts on instagram, meta, google, tiktock, koupon, etc
- social media management
- and content creation.

Not a typical client as he already is showing good interest in my DM agency!

What should my proposal or quotation document need to have?

reddit.com
u/Particular_Luck80 — 2 months ago