Skip to content

chore(release): 3.0.0#231

Merged
zaniluca merged 7 commits intoproductionfrom
master
Feb 8, 2026
Merged

chore(release): 3.0.0#231
zaniluca merged 7 commits intoproductionfrom
master

Conversation

@zaniluca
Copy link
Owner

@zaniluca zaniluca commented Feb 8, 2026

No description provided.

}}
textZoom={125}
onShouldStartLoadWithRequest={(event) => {
if (!/^[data:text, about:blank]/.test(event.url)) {
Copy link

Choose a reason for hiding this comment

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

Bug: The regex /^[data:text, about:blank]/ uses a character class instead of alternation, incorrectly trapping URLs like tel: or tg: in the WebView.
Severity: MEDIUM

Suggested Fix

The regular expression should be changed to use alternation | to match the entire intended prefixes. Replace the current regex with /^(data:|about:blank)/ to correctly test if the URL starts with either the string data: or about:blank.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/screens/NotificationDetail.tsx#L61

Potential issue: The regular expression `/^[data:text, about:blank]/` is intended to
prevent `data:` URIs and `about:blank` from opening in an external browser. However, it
incorrectly uses a character class `[]`, which matches any single character in the set
(`d`, `a`, `t`, `e`, `x`, etc.) at the start of the URL. While this correctly handles
`http://` links and accidentally handles `data:` links, it will incorrectly trap other
external links like `tel:` or `tg://` within the WebView instead of opening them
externally. This happens because their starting characters (`t`) are present in the
character class, causing the `if` condition to be false and preventing
`Linking.openURL()` from being called.

Did we get this right? 👍 / 👎 to inform future reviews.

}}
textZoom={125}
onShouldStartLoadWithRequest={(event) => {
if (!/^[data:text, about:blank]/.test(event.url)) {
Copy link

Choose a reason for hiding this comment

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

Bug: The regex for handling internal links uses a character class [] instead of a group (), causing it to incorrectly match URLs and prevent them from opening externally.
Severity: HIGH

Suggested Fix

Update the regular expression to use alternation with a non-capturing group to correctly match the intended URI schemes. Change /^[data:text, about:blank]/ to /^(?:data:|about:blank)/.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/screens/NotificationDetail.tsx#L61

Potential issue: The regular expression at `src/screens/NotificationDetail.tsx` is
intended to identify internal URIs like `data:` and `about:blank` to keep them within
the WebView. However, it incorrectly uses a character class (`[...]`) instead of a group
with alternation (`(...)`). The pattern `/^[data:text, about:blank]/` matches any URL
starting with a single character from the set `d, a, t, a, :, t, e, x, t, ,,  , a, b, o,
u, t, :, b, l, a, n, k`. As a result, URLs with schemes like `bitcoin://` or
`android-app://` will be incorrectly handled by the WebView instead of being opened
externally, breaking the intended behavior for external links.

Comment on lines +18 to 21
const { data: response } = await http.get(
"notification/list" +
(pageParam
? `?${new URLSearchParams({
Copy link

Choose a reason for hiding this comment

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

Bug: The frontend now expects a new paginated object structure from the notifications API, but the backend may still return a simple array, which would cause a runtime error.
Severity: CRITICAL

Suggested Fix

Ensure the backend API at the /notification/list endpoint has been updated to return the new paginated response object ({ data: [], hasMore: boolean, nextCursor: number }) and is deployed simultaneously with the frontend. Otherwise, the frontend code must be reverted to handle the old array-based response.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/hooks/notifications-hooks.ts#L18-L21

Potential issue: The code in `notifications-hooks.ts` was updated to expect a new
paginated API response structure from the `/notification/list` endpoint. It now expects
an object like `{ data: [...], hasMore: boolean, nextCursor: number }`. The previous
implementation expected a simple array of notifications. If the backend API has not been
updated to return this new object structure, the frontend will encounter a runtime error
when trying to access `response.data` and `response.hasMore` on what would be an array.
This would cause the notification list to fail to load for all users.

@zaniluca zaniluca merged commit 7aa7dda into production Feb 8, 2026
5 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.

1 participant