Repository navigation
Add support for configuring OpenAI reasoning effort - #2718
Conversation
|
No actionable comments were generated in the recent review. ð âđïļ Recent review infoâïļ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ð Files selected for processing (1)
ð§ Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds an OpenAI reasoning-effort option end-to-end: documents a new env var, extends shared config parsing, forwards the value into the OpenAI inference client and request payload, and surfaces the option in the compare-models tool. (<=50 words) Changes
Estimated code review effortðŊ 3 (Moderate) | âąïļ ~25 minutes Possibly related PRs
ðĨ Pre-merge checks | â 1 | â 2â Failed checks (2 warnings)
â Passed checks (1 passed)
âïļ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds support for configuring
Confidence Score: 3/5Not safe to merge â missing default will break all existing deployments on startup. Two P1 defects: a missing .default("none") that makes OPENAI_REASONING_EFFORT required (causing immediate startup failures for any deployment not yet setting the var), and a type inconsistency where "minimum" in the interface can never be reached from config. packages/shared/config.ts and packages/shared/inference.ts require fixes before merging. Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: packages/shared/config.ts
Line: 64
Comment:
**Missing default breaks existing deployments**
`OPENAI_REASONING_EFFORT` has no `.default("none")` and is not `.optional()`, making it a required env var. Any existing deployment that hasn't set this variable will fail to start with a Zod validation error. The docs say the default is `none`, but the schema doesn't reflect that.
```suggestion
OPENAI_REASONING_EFFORT: z.enum(["none", "low", "medium", "high", "xhigh"]).default("none"),
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: packages/shared/inference.ts
Line: 65
Comment:
**`"minimum"` is unreachable and inconsistent with docs**
The interface includes `"minimum"` as a valid value, but `config.ts` only accepts `["none", "low", "medium", "high", "xhigh"]`. `"minimum"` can never arrive here from config. Additionally, the documentation entry lists `minimal` (not `minimum`), introducing a three-way inconsistency. Either `"minimal"` should be added to the config enum and docs corrected to match, or `"minimum"` should be dropped from the interface.
```suggestion
reasoningEffort: "none" | "low" | "medium" | "high" | "xhigh";
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: packages/shared/inference.ts
Line: 129-130
Comment:
**`reasoning_effort` sent unconditionally to all models**
`reasoning_effort` is always included in every `inferFromText` request, even when the model doesn't support it. Many third-party OpenAI-compatible providers will return a 400 on an unknown field. Additionally, `"none"` is not a valid `ReasoningEffort` value per the OpenAI SDK â the `as ReasoningEffort` cast silently bypasses that constraint. Consider omitting the parameter when effort is `"none"`:
```ts
...(this.config.reasoningEffort && this.config.reasoningEffort !== "none"
? { reasoning_effort: this.config.reasoningEffort as ReasoningEffort }
: {}),
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: docs/docs/03-configuration/01-environment-variables.md
Line: 100
Comment:
**Docs list `minimal` but config enum doesn't include it**
The documentation lists `minimal` as a valid option, but the Zod enum in `config.ts` only accepts `["none", "low", "medium", "high", "xhigh"]`. Users setting `OPENAI_REASONING_EFFORT=minimal` will get a startup validation error.
```suggestion
| OPENAI_REASONING_EFFORT | No | none | Set to `none`, `low`, `medium`, `high` or `xhigh`. Controls the reasoning effort in reasoning models. See [OpenAI: How Reasoning Works](https://developers.openai.com/api/docs/guides/reasoning#how-reasoning-works) |
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Add support for configuring OpenAI reaso..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 6
ð§đ Nitpick comments (1)
packages/shared/inference.ts (1)
154-162: Reasoning-field fallback: consider guarding against non-string values.The fallback to
message.reasoningis a pragmatic workaround for OpenRouter models, but since this is a non-standard field, some providers return it as an object (e.g.,{ content, summary }) rather than a string. If that happens,responsewould flow through as a non-string and the caller (JSON.parse(response.response)) would throw a confusing error. Consider coercing/validating to string before returning.- const response = - chatCompletion.choices[0].message.content || - // `@ts-expect-error`: important: Some OpenRouter models might return the response in reasoning field yet the OpenAI API ChatCompletion type doesn't have this as a valid field. - chatCompletion.choices[0].message.reasoning; + const msg = chatCompletion.choices[0].message; + // `@ts-expect-error`: Some OpenRouter models return the answer in a non-standard `reasoning` field. + const reasoningField: unknown = msg.reasoning; + const response = + msg.content || + (typeof reasoningField === "string" ? reasoningField : undefined);ðĪ Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/shared/inference.ts` around lines 154 - 162, The fallback that assigns chatCompletion.choices[0].message.reasoning to response can yield non-string values (e.g., objects), causing downstream JSON.parse calls to fail; update the logic around the response variable in this module to validate and coerce to a string: if message.content is not present, check message.reasoning and if it's a string use it, if it's an object prefer reasoning.content or reasoning.response fields, else JSON.stringify(reasoning) before assigning to response (and keep the existing error throw if no usable value found). Ensure you update references to chatCompletion, choices, message.reasoning and the response variable accordingly so callers (e.g., the JSON.parse(response.response) usage) always receive a string.
ðĪ Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/docs/03-configuration/01-environment-variables.md`:
- Line 100: The docs, Zod enum and TS type disagree on the reasoning-effort
values: align OPENAI_REASONING_EFFORT (docs), the Zod enum in
packages/shared/config.ts, and OpenAIInferenceConfig.reasoningEffort in
packages/shared/inference.ts to the same canonical set of strings (choose either
OpenAI's ReasoningEffort values or your internal expanded set), and update the
docs to match that chosen spelling (e.g., "minimum" vs "minimal"). If you keep
internal-only values like "none" or "xhigh", add explicit mapping in
inference.ts (the request preparation / mapping logic around the existing
mapping comments) to convert them to the OpenAI ReasoningEffort values (or omit
the field when "none") before sending to the API so runtime validation and the
API client agree. Ensure the Zod enum, OpenAIInferenceConfig.reasoningEffort
type, and the README entry for OPENAI_REASONING_EFFORT all use the exact same
strings.
In `@packages/shared/config.ts`:
- Line 64: OPENAI_REASONING_EFFORT is currently required and missing
documented/typed values; make it optional with a default of "none" and reconcile
the allowed literals across schema, type, and docs: update the z.enum for
OPENAI_REASONING_EFFORT to include the full agreed set of literals (add the
missing reasoning value(s) documented/typed â e.g., "minimal" vs "minimum") and
call .optional().default("none") on it, then change
OpenAIInferenceConfig.reasoningEffort in packages/shared/inference.ts to use the
exact same literal set, and update the docs table to match that same set so all
three sources agree.
In `@packages/shared/inference.ts`:
- Line 65: The union type for reasoningEffort in the inference type definition
is using "minimum" but the rest of the codebase and docs use "minimal"; change
the union in the reasoningEffort declaration to "minimal" (i.e.,
reasoningEffort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh") and
update any code that sets or validates this value (e.g., the config validation
and the assignment that references reasoningEffort) to use "minimal" so types
and runtime validation match.
- Around line 129-130: The code currently always injects reasoning_effort
(this.config.reasoningEffort) into the request payload which breaks
non-reasoning models; change it to conditionally include reasoning_effort only
for models that support reasoning following the same pattern used for
service_tier: add a predicate (e.g., modelSupportsReasoning(model) or check the
model id against the reasoning-model set) and only set reasoning_effort when
that predicate is true, leaving it out for standard models like "gpt-4.1-mini";
update the payload construction around reasoning_effort to mirror how
service_tier is handled so the field is omitted for unsupported models.
In `@tools/compare-models/src/config.ts`:
- Line 32: The INFERENCE_REASONING_EFFORT z.enum in
tools/compare-models/src/config.ts diverges from the canonical set used by
OpenAIInferenceConfig.reasoningEffort and packages/shared/config.ts (missing the
"minimal"/"minimum" literal and mixing single/double quotes); update
INFERENCE_REASONING_EFFORT to exactly match the canonical literal list from
packages/shared/config.ts/OpenAIInferenceConfig.reasoningEffort (use the same
ordering and the same spelling for the minimal variant), use consistent
double-quote string literals, and keep the same .optional().default(...) value
consistent with the shared config.
- Around line 27-31: INFERENCE_USE_MAX_COMPLETION_TOKENS schema is setting a
string default after a transform to boolean which yields incorrect
types/behavior; update the schema for INFERENCE_USE_MAX_COMPLETION_TOKENS to
apply the default to the input before the transform (use .prefault("false")
prior to .transform((val) => val === "true")) and remove the post-transform
.default so the schema output is a proper boolean.
---
Nitpick comments:
In `@packages/shared/inference.ts`:
- Around line 154-162: The fallback that assigns
chatCompletion.choices[0].message.reasoning to response can yield non-string
values (e.g., objects), causing downstream JSON.parse calls to fail; update the
logic around the response variable in this module to validate and coerce to a
string: if message.content is not present, check message.reasoning and if it's a
string use it, if it's an object prefer reasoning.content or reasoning.response
fields, else JSON.stringify(reasoning) before assigning to response (and keep
the existing error throw if no usable value found). Ensure you update references
to chatCompletion, choices, message.reasoning and the response variable
accordingly so callers (e.g., the JSON.parse(response.response) usage) always
receive a string.
ðŠ Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
âđïļ Review info
âïļ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cfae97f7-f010-4f6e-ae6e-e2af566c1af3
ð Files selected for processing (5)
docs/docs/03-configuration/01-environment-variables.mdpackages/shared/config.tspackages/shared/inference.tstools/compare-models/src/config.tstools/compare-models/src/inferenceClient.ts
2a13b0b to
6154e38
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ðĪ Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/docs/03-configuration/01-environment-variables.md`:
- Line 100: Update the OPENAI_REASONING_EFFORT table row so the inline code list
is formatted with a space after the comma (change "`none`,`minimal`" to "`none`,
`minimal`") and add a trailing period to the sentence describing the setting;
edit the row containing the OPENAI_REASONING_EFFORT entry in the Markdown table
to apply these two small punctuation fixes.
ðŠ Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
âđïļ Review info
âïļ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 09da3bab-2870-41c2-a792-290f93736876
ð Files selected for processing (5)
docs/docs/03-configuration/01-environment-variables.mdpackages/shared/config.tspackages/shared/inference.tstools/compare-models/src/config.tstools/compare-models/src/inferenceClient.ts
â Files skipped from review due to trivial changes (2)
- packages/shared/config.ts
- tools/compare-models/src/inferenceClient.ts
ð§ Files skipped from review as they are similar to previous changes (1)
- packages/shared/inference.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
ðĪ Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/docs/03-configuration/01-environment-variables.md`:
- Line 96: The table row for OPENAI_API_KEY uses the ambiguous link text
"[here]"; update that Markdown link on the OPENAI_API_KEY line to use
descriptive link text (e.g., "OpenAI administration guide" or "OpenAI setup and
usage") instead of "here" so readers and screen readers can understand the
target without context, keeping the existing target URL
../06-administration/03-openai.md unchanged.
ðŠ Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
âđïļ Review info
âïļ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d01a6c8e-010c-4306-a787-5d843292154b
ð Files selected for processing (1)
docs/docs/03-configuration/01-environment-variables.md
| | Name | Required | Default | Description | | ||
| | ------------------------------------ | -------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | ------------------------------------ | -------- |------------------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | OPENAI_API_KEY | No | Not set | The OpenAI key used for automatic tagging. More on that in [here](../06-administration/03-openai.md). | |
There was a problem hiding this comment.
Use descriptive link text instead of âhereâ.
[here] is ambiguous and hurts scanability/accessibility in docs.
âïļ Suggested doc tweak
-| OPENAI_API_KEY | No | Not set | The OpenAI key used for automatic tagging. More on that in [here](../06-administration/03-openai.md). |
+| OPENAI_API_KEY | No | Not set | The OpenAI key used for automatic tagging. More details in the [OpenAI administration guide](../06-administration/03-openai.md). |ð Committable suggestion
âžïļ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | OPENAI_API_KEY | No | Not set | The OpenAI key used for automatic tagging. More on that in [here](../06-administration/03-openai.md). | | |
| | OPENAI_API_KEY | No | Not set | The OpenAI key used for automatic tagging. More details in the [OpenAI administration guide](../06-administration/03-openai.md). | |
ð§° Tools
ðŠ markdownlint-cli2 (0.22.0)
[warning] 96-96: Link text should be descriptive
(MD059, descriptive-link-text)
ðĪ Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/docs/03-configuration/01-environment-variables.md` at line 96, The table
row for OPENAI_API_KEY uses the ambiguous link text "[here]"; update that
Markdown link on the OPENAI_API_KEY line to use descriptive link text (e.g.,
"OpenAI administration guide" or "OpenAI setup and usage") instead of "here" so
readers and screen readers can understand the target without context, keeping
the existing target URL ../06-administration/03-openai.md unchanged.
|
@MohamedBassem q: on your changes to the branch, having reasoning passed in always, even if undefined, makes it possible to pass an undefined value field to the request, doesn't it? Which might lead to errors, depending on how strict the end APIs are. This for Open router/non OpenAI yet OpenAI compatible endpoints. Similarly, still, some reasoning models might return their response in the reasoning field. I think it's a fair edge case. Is within the real of possibility making the LLM integration more flexible in terms of provider support? i.e openRouter has a sdk which might be more flexible than the Open AI one. Maybe adding a conditional branch for Open router requests to better support these edge cases. |
|
@cinconueves typically, passing undefined to such APIs are equivalent to not passing the value at all. So I think semantically, it'll end up being the same. As for the model reasoning field, I'd consider this to be an edge case, that I'm not comfortable supporting generically, specially with the typescript error silencing. As for the LLM integration, I'm trying to keep that slim as much as possible given that our needs are minimal. I already regret having ollama as a separate SDK versus using the openai compatible API that they have. Each new branch adds maintenance burden for me. That's why I'd rather only have the openai compatible API. I might in the future consider using something like the AI SDK from vercel to abstract that up, but for now, I'd like to keep it minimal. |
Thanks, that makes sense. |
* fix: add support for instapaper archived status and folders * fix(mobile): truncate bookmark title with tailwind shrink (karakeep-app#2699) * fix(mobile): remove react-native-keyboard-controller patch (karakeep-app#2697) The upstream fix for the status bar inset issue was merged and released in v1.21.5, so our local patch is no longer needed. Closes karakeep-app#2581 * docs(mobile): add SENTRY_DISABLE_AUTO_UPLOAD=true to build apk without sentry dsn (karakeep-app#2700) * docs(mobile): add SENTRY_DISABLE_AUTO_UPLOAD=true to build apk without sentry dsn * include pr suggestion * put SENTRY_DISABLE_AUTO_UPLOAD=true in package.json scripts instead * deps: upgrade to zod 4 (karakeep-app#2689) * deps: upgrade to zod 4 * fix: preserve zod 4 schema compatibility Use safeExtend where refined signup schemas are extended so the affected modules can initialize safely under Zod 4. Keep the generated OpenAPI output aligned with runtime validation and centralize the zod-to-openapi initialization. * chore: freshen up docker-compose.yml for local dev purposes (karakeep-app#2149) * feat(mobile): add keep screen on toggle for bookmark viewing (karakeep-app#2691) * feat(mobile): add keep screen on toggle for bookmark viewing Adds a Reading-section toggle that activates expo-keep-awake while a bookmark is open, covering all in-app views (reader, browser, screenshot, archive, pdf, text, asset). Defaults off; releases the wake lock as soon as the user navigates away from the bookmark detail screen. Closes karakeep-app#2650 * fix(mobile): disable keep-screen-on toggle while settings are hydrating Prevents writing stale default settings to SecureStore if the user toggles before hydration completes. * fix: add clawhub metadata to karakeep skill * fix: fix clawhub skill yaml * docs: add skills to docs * docs: Update worker list in the environment variable reference (karakeep-app#2710) * deps: upgrade oxlint and oxfmt * fix: add missing source to createBookmarks from import * feat: Add Readwise Reader import (karakeep-app#2690) Co-authored-by: Luis Zuniga <wichogzf@gmail.com> * fix: deduplicate crawl jobs using idempotency key (karakeep-app#2678) * feat: add OneTab import support (karakeep-app#2495) * feat(import): add OneTab import support Adds a OneTab import card to the ImportExport settings page. Implements a parser for OneTab's "URL | Title" line format with deduplication, and registers "onetab" as an import source. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: add tests for the inference worker * fix: add ability to manually finalize/delete staged import sessions (karakeep-app#2713) * fix(docker): add `ffmpeg` as required by `yt-dlp` (karakeep-app#2721) * fix: invalidate existing password reset tokens before issuing a new one (karakeep-app#2722) - Wrap reset token replacement in a transaction - Delete any prior tokens for the user before inserting the new token * fix: add ratelimiting for the changePassword endpoint (karakeep-app#2723) * fix: sanitize user names before storing them (karakeep-app#2724) * Sanitize user names before storing them - Strip HTML from signup and OAuth display names - Enforce non-empty plain-text names in validation - Add tests for sanitized and HTML-only name inputs * more changes * Harden user name validation * more changes * fix: add data: to style-src and font-src CSP directives in serveAsset (karakeep-app#2657) Monolith-generated full-page archives inline stylesheets and fonts as data: URIs. The previous CSP blocked these, causing broken rendering. Adding data: to style-src and a new font-src directive unblocks them, matching the precedent set by img-src which already includes data:. Fixes: karakeep-app#2621 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: fix pnpm symlink conflict (karakeep-app#2725) * fix: include userId in ratelimit key if the user is authed (karakeep-app#2726) * feat(mcp): add update-bookmark tool (karakeep-app#2717) Wraps PATCH /bookmarks/{bookmarkId} so MCP clients can modify an existing bookmark instead of only creating/reading one. Exposes the commonly useful patchable fields (title, note, summary, archived, favourited, url, description, author, publisher, createdAt); less common/destructive ones (text, assetContent, datePublished, dateModified) are intentionally omitted to reduce accidental clobbering of crawler-populated data. The PATCH response schema does not include tags/content/assets, so the tool follows up with a GET to return a full compactBookmark view of the updated record. * fix: use relative path for logout redirect to avoid port mismatch (karakeep-app#2655) signOut({ redirect: false }) returns an absolute URL constructed from NEXTAUTH_URL (e.g. http://localhost:3000/). When Docker remaps an external port to the internal one, this sends users to the wrong port. Using router.push('/') lets Next.js resolve against the user's origin. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(web): auto-add bookmark to list on selection (karakeep-app#2629) * feat(web): auto-add bookmark to list on selection Remove the 'Add' button from Manage Lists modal. When a user selects a list from the dropdown, the bookmark is now automatically added to that list, simplifying the user experience. Users can still remove a bookmark from a list by clicking the X button next to the list name. Fixes karakeep-app#2604 * fix: add loading state and prevent duplicate submission in ManageListsModal - Added isPending state from useAddBookmarkToList hook - Added duplicate submission prevention in onChange handler - Added disabled prop to BookmarkListSelector component * style: fix indentation in useAddBookmarkToList callback - Fix incorrect indentation of onSuccess and onError callbacks - Add trailing newline at end of file * fix: address review comments for PR karakeep-app#2629 - Add trailing newline at end of file - Remove redundant in-flight guard check (disabled prop handles it) - Add guard for getPathById to prevent crash on stale cache - Disable interactions while list membership data is loading * fix: use translation for DialogTitle in ManageListsModal * fix: add isLoading guard to onChange callback in BookmarkListSelector * fix(web): improve ManageListsModal accessibility and rendering - Add aria-label to remove button for accessibility (CodeRabbit comment 3006737430) - Remove allLists gating to allow list.name fallback to render (CodeRabbit comment 3006737429) - Use optional chaining for path lookup * feat(extension): add manual save toggle for browser extension (karakeep-app#2693) * feat: add manual save toggle for browser extension * fix: add check for appending ellipses * chore: add PR template inspired from immich * chore: fix PR template path * feat: Add native single-file support to browser extension (karakeep-app#2197) * feat: Add native SingleFile support to browser extension This commit integrates single-file-core into the browser extension, allowing users to capture complete web page archives when saving bookmarks. * fix: truncate urls in crawler logs * feat: change the default new list emoji to folder * feat: add support for configuring OpenAI reasoning effort (karakeep-app#2718) * Add support for configuring OpenAI reasoning effort * Update docs' formatting Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * minor fixes * minor fixes --------- Co-authored-by: Luis Zuniga <wichogzf@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: skip url getContentType fetch if precrawledArchiveAssetId exists (karakeep-app#2580) * deps: upgrade astro to 6.1.6. fixes karakeep-app#2728 * fix: fix broken cache invalidation requiring refresh after adding a bookmark to a tag or a list * feat: add granular API key scopes (karakeep-app#2731) * fix: fix promise race leaks in the worker (karakeep-app#2737) * fix: change the archive button in the manage lists dialog to be a secondary button * chore: add portless pnpm scripts * feat(mobile): customizable reader toolbar (karakeep-app#2527) * feat(mobile): add auto-hiding reader toolbar with customizable actions and overflow menu Redesign the bookmark reader bottom bar with configurable toolbar actions, an overflow ellipsis menu using native MenuView, and auto-hide on scroll. Add toolbar settings page for reordering visible/overflow actions. Support iOS 26 glass pill styling and transparent headers with edge-to-edge content. * Update apps/mobile/components/bookmarks/BottomActions.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix comment * fix(mobile): address PR review findings for reader toolbar - Fix silent fall-through when sharing non-image/non-pdf assets - Pass contentInsetTop to browser/archive WebViews for iOS 26 - Auto-inject missing action IDs into overflow on settings load - Extract NAV_BAR_HEIGHT constant to replace magic number 44 - Remove unused ownerOnly/linkOnly from ToolbarActionMeta - Extract triggerHaptic() helper to handle async catch - Deduplicate image/PDF share logic with finally cleanup - Add console.warn for unknown menu action events - Simplify headerPlatformOptions to plain isIOS26 ternary - Fix inaccurate comment about top/bottom padding * remove margin around text view * fix bottom inset * fix reading progress bar regression, add small gap * Add redesigned reading progress pill, blur effect for iOS 18 and lower * small review fixes * fix icon colors in dark mode * Add missing @/lib/ios module for isIOS26 platform detection * downgrade expo-blur to match expo * Update to stable expo-glass-effect version * fix(mobile): close reader view after archiving bookmark * chore(mobile): remove auto-hiding header/footer and pill redesign from toolbar PR Split these concerns out so this branch lands only the customizable toolbar. Auto-hiding native header, auto-hiding bottom toolbar, and the redesigned continue-reading pill will return together in a follow-up reader-chrome PR, where they belong architecturally as a single feature. * fix footer padding on iOS 26 * unify handling of archive and fav in bottom actions * abstract share logic * dynamic labels depending on bookmark state * fix overflow submenu in android * review comments * feat: add metrics for sub status * chore: add infra for the event logger * feat: add exhaustive event logging * fix: fix nodejs bundling for the eventLogger * fix: upgrade zod resolver to fix form validations (karakeep-app#2744) * fix: bump up zod resolver * fix: follow greptile review * fix: reject user deletion with active subscription * chore: add event logging for bookmark summarization * fix: fix subscription tranisiton event logging * feat(mobile): revamp search and navigation chrome (karakeep-app#2685) * FAB styling looks good, still working on search * Finish pr * use latest expo-glass-effect version * feat(mobile): auto-focus search bar when iOS search tab gains focus * fix(mobile): address PR review feedback - Fix search history: save new terms on blur via useEffect in BookmarkSearchResults and index.ios.tsx onBlur handler - Fix keepPreviousData: use isPending instead of isFetching for spinner guards so stale results stay visible during refetches - Add enabled guard on search queries to avoid firing on empty input - Increase debounce from 10ms to 300ms on iOS search tab - Add accessibility labels/roles to close buttons in search and InlineSearch - Increase ProfileAvatarButton tap target to 44px minimum, add a11y props, convert static styles to Tailwind - Fix tags empty state to show "No tags match your search" when filtering - Fix stale comment in Android search stub * feat(mobile): prevent iOS tab bar from shrinking and resize FAB Disable tab bar minimize behavior on iOS so it stays at full height when scrolling. Enlarge the FAB to better match the native search button size and adjust its positioning. * fix broken ProfileAvatarButton on iOS due to bad CodeRabbit suggestion * fix(mobile): lock FAB glass effect to app color scheme Pin GlassView and BlurView to the app's current color scheme instead of adapting to background content, preventing the FAB from switching to light appearance over white content in dark mode. * fix(mobile): add tintColor to FAB glass effect for consistent appearance Use GlassView tintColor to prevent the FAB from adapting to background content, keeping it dark in dark mode and light in light mode regardless of what's behind it. * fix(mobile): use PlatformColor for FAB icon vibrancy on iOS Replace hardcoded foreground color with PlatformColor("label") so the FAB icon participates in UIKit vibrancy and stays legible against the adaptive liquid glass effect. Revert FAB GlassView to its clean default with no colorScheme or tintColor overrides. * fix(mobile): trim search term in onBlur before persisting The onBlur handler checked trim().length but passed the untrimmed value to addTerm(), allowing whitespace-padded terms into search history. * revert bad change in lists * revert tag spacing change Co-authored-by: Copilot <copilot@github.com> * remove unused search component * fix broken view switching in ios search results * drop the search screen stack from root layout * remove global search * search on type * remove duplicate expo-blur from package.json * restore header for ios --------- Co-authored-by: Copilot <copilot@github.com> * fix: debounce bulk query invalidations (karakeep-app#2745) * Debounce bulk query invalidations * Avoid scheduling predicate invalidations * Document predicate invalidation bypass * feat: Allow multiple lists for Rule Engine karakeep-app#2490 (karakeep-app#2620) * feat: Allow multiple lists for Rule Engine karakeep-app#2490 feat: Allow multiple lists for Rule Engine karakeep-app#2490 feat: Allow multiple lists for Rule Engine karakeep-app#2490 * re-add db migration * codex review comments * chore: use .gitignore as source of truth for oxfmt and oxlint (karakeep-app#2740) * chore: use .gitignore as source of truth for oxfmt and oxlint Wire `--ignore-path=../../.gitignore` into every per-package format/lint script and prune the duplicated `ignorePatterns` arrays from each oxfmt/oxlint config. For oxfmt in packages with a local `.gitignore` (mobile, browser-extension, cli, mcp, sdk, benchmarks, e2e_tests), pass the local file as a second `--ignore-path` too. oxlint only accepts one `--ignore-path`, so mobile retains `ios/`, `android/` etc. in its `ignorePatterns`. Observed issue: files in the `.astro/` directory in apps/landing were getting flagged by the format check in the precommit hook, because oxfmt running from the package cwd does not auto-discover the root `.gitignore` (it only reads a `.gitignore` in cwd). The explicit `--ignore-path` makes the gitignore policy consistent regardless of the invocation directory. * tests: add a test for browser rendering * fix(ui): resolve text clipping in bookmark cards (karakeep-app#2748) * fix: prevent text overflow * Update apps/web/components/dashboard/bookmarks/NotePreview.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * refactor: correct formatting --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * feat: redesign list and tag page headers (karakeep-app#2749) * feat: redesign list and tag page headers Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(landing): add safari links to landing * deps: upgrade protobufjs * fix: fix allow the adblocker to run after request interception * feat: Add agentic skills links to the landing page (karakeep-app#2761) * fix: fix SSRF handling with redirects in crawler worker (karakeep-app#2759) * feat(mobile): open links and images in in-app browser (karakeep-app#2696) * feat(mobile): open links and images in in-app browser instead of navigating away Links and media clicked within bookmark reader, browser, and archive views now open in an in-app browser overlay (expo-web-browser) or fullscreen image viewer instead of navigating the current view away from the bookmark content. * fix(mobile): address PR review comments for link handling Use origin-based comparison instead of one-shot hasLoaded flag in BookmarkLinkBrowserPreview to correctly handle HTTP redirects on iOS. Remove dead href.startsWith("#") branch in BookmarkHtmlHighlighterDom. Combine duplicate imports from react-native-webview/lib/WebViewTypes. * fix: format BookmarkLinkPreview import * fix: extract bookmarkUrl to preserve type narrowing in useCallback * fix(mobile): allow text selection on links for highlighting Strip href from links and store in data-href so the browser treats them as regular selectable text instead of activating native link gestures (iOS preview sheet, Android drag-and-drop). A MutationObserver re-strips hrefs after DOM changes from highlight effects. * feat: Add CLI auth config support (karakeep-app#2751) * fix: typo in docker docs (karakeep-app#2762) * fix: fix timezone handling in date displays across the app (karakeep-app#2682) * fix: use safe favicon resolution in metascraper (karakeep-app#2763) * fix: use correct env variable syntax for perplexity (karakeep-app#2765) * fix: use correct env variable syntax * fix: env syntax for perplexity base url * fix: harden video worker redirect validation against SSRF (karakeep-app#2760) * refactor: refactor bulk actions to store bookmark ids (karakeep-app#2767) * fix(mobile): fix scrolling in manage tags page in ios * docs: add a comment to security docs about SSRF mitigations * feat: add keyboard shortcuts (karakeep-app#2750) * i18n: Sync weblate translations Co-authored-by: CircleCrop <guhengting@gmail.com> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: OpenAI <noreply-mt-openai@weblate.org> Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ar/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/cs/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/da/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/de/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/el/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/en_US/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/es/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/fa/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/fi/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/fr/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ga/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/gl/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/hr/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/hu/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/it/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ja/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ko/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/nb_NO/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/nl/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/pl/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/pt/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/pt_BR/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/ru/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/sk/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/sl/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/sv/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/tr/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/uk/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/vi/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/zh_Hans/ Translate-URL: https://hosted.weblate.org/projects/karakeep/karakeep/zh_Hant/ Translation: Karakeep/Karakeep * i18n: fix automated i18n strings * feat(web): add more details to the all lists page * fix(crawler): proper handling for proxy auth with CDP interceptions * release(docs): release the 0.32 docs * release: release cli, sdk, mobile and extension * release(cli): release CLI 0.32.0 * docs: minor docs update to mention the skills and the new singlefile integration * feat(browser-extension): request host permission at runtime for client side crawling (karakeep-app#2784) Move `<all_urls>` from `host_permissions` to `optional_host_permissions` so it isn't requested at install time. The permission is now requested via `chrome.permissions.request()` when the user enables client-side crawling in the extension settings, and removed when they disable it. The settings toggle and the capture path both gate on whether the permission is actually granted. https://claude.ai/code/session_01NnQnr1B9KSRriTaQkZM6AP Co-authored-by: Claude <noreply@anthropic.com> * release(extension): Release version 1.2.11 * docs: update screenshots in the docs * fix(mobile): fix insets on new iOS settings formSheet modal (karakeep-app#2793) The settings screen is presented as an iOS formSheet with an opaque, non-large header (since 649efb8). iOS sizes the formSheet's inner content view ~headerHeight pixels taller than the visible sheet area, so the bottom of the settings list was clipped behind the sheet's bottom edge. contentInsetAdjustmentBehavior="automatic" correctly handles the top (adding the right top inset to clear the opaque header), but does not add a corresponding bottom inset for the formSheet's invisible bottom region. Adding useHeaderHeight() to paddingBottom pushes the trailing content up to a visible position. * fix(mobile): stack Upload Image Quality slider on two lines (karakeep-app#2794) The MEDIA â Upload Image Quality row in mobile settings crammed the label, percentage, and slider onto one horizontal line, leaving the slider only a few dozen pixels wide on phone widths. Switch the row to a vertical layout: label + percentage on top, full-width slider beneath. * feat(mobile): tablet/iPad UI polish for toolbar and FAB (karakeep-app#2788) * Set max width for reader toolbar on tablets * fix(mobile): remove FAB bottom inset on iPad iPad's tab bar geometry doesn't need the extra 57â60pt lift the iPhone FAB uses. * fix(mobile): give reader toolbar icons proper spacing on iPad Replace the inner row's width/maxWidth + space-between approach with an intrinsic gap. The earlier cap caused the row to collapse to its natural icon width inside the hug-fit GlassView, leaving icons cramped against each other. Using `gap: 28` gives each icon real breathing room and lets the pill size to its contents naturally. * fix(mobile): fix formsheet padding in manage_lists, manage_tags and info sheets * fix(mobile): fix color of list separator in recent searches list * fix(mobile): improve perf of manage_tags page * release(mobile): release mobile v1.9.4 * fix: serve unoptimized nextjs images This is a temporary fix to be able to patch the recent NextJS security update until a proper fix is available. * deps: upgrade nextjs to 15.5.18 * docs: update SECURITY.md * feat(db): add PostgreSQL migration for upstream schema sync Adds PG equivalent of the SQLite migrations 0083 (apiKey scopes) and 0084 (rule engine multi-list refactor) brought in by the upstream merge. The auto-generated migration was missing two things needed for parity with the SQLite version: 1. A SQL DEFAULT for apiKey.scopes to backfill existing rows (matches SQLite's `DEFAULT '["fullaccess"]'`). 2. Data migration for the event JSON in ruleEngineRules: delete rules with empty listId in addedToList/removedFromList events, then transform single listId to a listIds array. Both data-migration steps mirror what upstream's SQLite migration does using SQLite's json_extract/json_set, translated to PG's jsonb operators. Verified with `drizzle-kit check` (schema/migration consistent) and the schema-sync test (column lists match across dialects). * fix(docker): pin postgres overlay to v18 and fix volume mount Bumps the PostgreSQL overlay from postgres:16-alpine to postgres:18-alpine to match the production deployment, and fixes the volume mount that PG18 rejects. PG18+ stores data in a version-specific subdirectory under /var/lib/postgresql (e.g. /var/lib/postgresql/18/docker). The image refuses to start if the volume is mounted at the legacy /var/lib/postgresql/data path, even on a fresh install. Mounting one level up lets PG18 manage its own subdirectory layout. Also documents the migration-smoke-test command pattern in the overlay header: pair the overlay with a base compose file and `up postgres -d` to bring up just postgres, then run `pnpm --filter=@karakeep/db migrate` from the host. Verified end-to-end against postgres:18-alpine (PG 18.4). Upgrading an existing PG16 fork deployment to this overlay is a breaking change â the volume layout is incompatible and requires pg_upgrade or a dump/restore. --------- Co-authored-by: Mohamed Bassem <me@mbassem.com> Co-authored-by: xuatz <xzlow10@gmail.com> Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com> Co-authored-by: Max <43565398+maxim-mityutko@users.noreply.github.com> Co-authored-by: Luis G. ZÃšÃąiga <github@nuevenueves.com> Co-authored-by: Luis Zuniga <wichogzf@gmail.com> Co-authored-by: Nikhil Chowdhury <54472147+NikhilChowdhury27@users.noreply.github.com> Co-authored-by: apo-mak <apo-mak@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Maxime Pinot <contact@maximepinot.com> Co-authored-by: Om Mishra <152969928+howwohmm@users.noreply.github.com> Co-authored-by: Vladimir Balko <147043796+vbalko-claimate@users.noreply.github.com> Co-authored-by: å°æ°īæģĄæļæ <87858694+xingzihai@users.noreply.github.com> Co-authored-by: Morgan Kesler <keslerm@aegiszero.is> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: GSAlex <GSAlex@users.noreply.github.com> Co-authored-by: Beluga <mikhailbialouwork@gmail.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Ahmed Abdelkarim <ahmad.abdelkarim89@gmail.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Mark :) <Mxrk@users.noreply.github.com> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: CircleCrop <guhengting@gmail.com> Co-authored-by: OpenAI <noreply-mt-openai@weblate.org>
* Add support for configuring OpenAI reasoning effort * Update docs' formatting Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * minor fixes * minor fixes --------- Co-authored-by: Luis Zuniga <wichogzf@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.