Skip to content

remove effect wrap for safe methods#11

Merged
fiws merged 6 commits intomainfrom
refactor/unwrap-safe-methods
Feb 17, 2026
Merged

remove effect wrap for safe methods#11
fiws merged 6 commits intomainfrom
refactor/unwrap-safe-methods

Conversation

@fiws
Copy link
Copy Markdown
Collaborator

@fiws fiws commented Feb 13, 2026

I used AI to check each method if it can throw. Added a skill just for this.

This change makes certain things less cumbersome because you don't have to yield stuff. Logging the URL is a very common thing for example, which now can be fully synchronous.

@fiws fiws self-assigned this Feb 13, 2026
@fiws fiws force-pushed the refactor/unwrap-safe-methods branch 4 times, most recently from 3e43f29 to ad7346f Compare February 14, 2026 09:16
@fiws fiws force-pushed the refactor/unwrap-safe-methods branch from ad7346f to 613e9fa Compare February 14, 2026 09:28
@fiws fiws requested review from StefanWerW and meowhib February 15, 2026 21:35
Copy link
Copy Markdown

@meowhib meowhib left a comment

Choose a reason for hiding this comment

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

i think we need to update the readme file too

Unwrap `ok`, `status`, `statusText`, and `fromServiceWorker` in `PlaywrightResponse` from `Effect` to simple synchronous thunks.
These properties are available on the underlying Playwright object without async calls or potential errors.
@fiws fiws force-pushed the refactor/unwrap-safe-methods branch from 635d096 to 38661e1 Compare February 16, 2026 17:59
Copy link
Copy Markdown

@meowhib meowhib left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@StefanWerW StefanWerW left a comment

Choose a reason for hiding this comment

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

Looks good overall.
Again, like we have spoken, this is more a option thing, I would maybe prefer all function being effect instead of direct function for safe methods. But I also do not have strong arguments for my preference or/and against this, and is also not wrong at all.

So if you feel that is more ergonomic this way, we can proceed like this.

@fiws fiws merged commit a690aa1 into main Feb 17, 2026
1 check passed
@fiws fiws deleted the refactor/unwrap-safe-methods branch February 17, 2026 15:48
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