Skip to content

Conversation

@sean-mcgrade
Copy link

@sean-mcgrade sean-mcgrade commented Dec 4, 2025

Describe Your Changes

This adjustment sets the base font size to 20px and enables Ctrl+Scroll zoom for improved accessibility on high-DPI monitors.

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Vanalite and others added 30 commits November 20, 2025 14:28
…anhq#7027)

* fix: preserve dollar sign followed by numbers in markdown rendering

Previously, the regex replacement for escaping $<number> patterns was
incorrectly using $1 in the replacement string, which was interpreted
as a backreference. This caused values like "$200" to be rendered as
"$1" in the UI.

Changed to use a replacement function that explicitly concatenates
the escaped dollar sign with the captured number group.

* chore: update RenderMarkdown unit tests
fix: reattach the same file after deletion fix
…anhq#7031)

* feat: add embedding flag to model metadata and automatic detection

Add an `embedding` boolean field to both `modelInfo` and `ModelConfig`.
Implement `resolveEmbeddingConfig` to read GGUF metadata for BERT‑based architectures, determine if a model is an embedding model, and persist the result back to `model.yml`.
Update model loading, listing, and validation logic to expose and use the new flag.

This change reduces repeated GGUF reads, speeds up model discovery, and allows the system to distinguish embedding‑capable models for downstream use.

* fix: filter out embeddings model from model list

---------

Co-authored-by: Louis <louis@jan.ai>
fix: Fix extension installation link
fix: spawn new process with window close flag
feat: update link to chrome store for Jan extension
…jects

fix: disable context menu list projects
Vanalite and others added 25 commits December 1, 2025 18:03
Close window but let app clean up in background
fix: fix linter with missing parameters
fix: killing process with name checking logic
feat: Dialog to install Jan extension
feat: Cancellation mechanism during mcp connectivity check
* embedding works for large files

* attachment as inline

* update tan stack router

* attachment works with proper selection

* fix test

* wait for model to start before doing things

* Token Count now counts inline

* Revert "embedding works for large files"

This reverts commit 8518486.

* refactor: add batch processing to embedTexts

Implemented batch‑based embedding for both rag-extension and vector-db-extension.
- Introduced a `batchSize` parameter with a sensible default.
- Processed texts in chunks to avoid large single calls to the LlamaCPP embed API.
- Mapped batch results to global indices and added per‑batch error handling.
- Logged failures and re‑thrown errors with contextual information.

This change improves memory usage, resilience to API timeouts, and overall scalability of the embedding pipeline.

* Update web-app/src/locales/fr/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/ru/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update web-app/src/locales/pt-BR/common.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix lint

* attachment works properly now

* update padding

---------

Co-authored-by: Akarshan <akarshan@menlo.ai>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Handle attachment parsing error (exit gracefully)

* Revert "Handle attachment parsing error (exit gracefully)"

This reverts commit 56a356f.

* Handle attachment parsing error (exit gracefully)
Copilot AI review requested due to automatic review settings December 4, 2025 08:02
Copilot finished reviewing on behalf of sean-mcgrade December 4, 2025 08:03
@sean-mcgrade sean-mcgrade changed the title Feature/20px font scaling Feat: Hardcoded 20px Font and Scroll Zoom Fix for High-DPI Displays Dec 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a comprehensive overhaul of font scaling, attachment handling, and MCP server management. The changes introduce a 20px base font size via CSS override, add inline document injection capabilities with automatic size-based routing, improve MCP server lifecycle management with proper shutdown contexts, and enhance the Jan Browser extension integration with connection status checking.

Key Changes:

  • Replaced entire CSS styling system with a 20px font override
  • Added document parsing modes (auto/inline/embeddings/prompt) with context-aware routing
  • Refactored MCP server shutdown logic with context-specific timeouts and concurrent operation guards
  • Implemented Jan Browser extension connection detection via ping/snapshot tools
  • Enhanced embedding batching for better performance with large text inputs

Reviewed changes

Copilot reviewed 109 out of 110 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
web-app/src/index.css Complete CSS replacement with 20px font override
web-app/src/types/attachment.ts Added parseMode, injectionMode, and inlineContent fields
web-app/src/lib/attachmentProcessing.ts New centralized attachment processing with auto/prompt modes
web-app/src/hooks/useAttachments.ts Added parseMode, autoInlineContextRatio settings and initialization retry logic
web-app/src/hooks/useChat.ts Refactored to use centralized attachment processing with per-file choice handling
web-app/src/containers/ChatInput.tsx Integrated Jan Browser extension toggle and attachment state management
src-tauri/src/core/mcp/helpers.rs Added ShutdownContext enum and refactored cleanup with timeout controls
src-tauri/src/core/mcp/commands.rs Implemented check_jan_browser_extension_connected command
extensions/llamacpp-extension/src/index.ts Added embedding model detection and batched embedding requests
extensions/rag-extension/src/index.ts Added parseDocument method and parseMode configuration

Comments suppressed due to low confidence (7)

web-app/src/index.css:1

  • The entire CSS architecture has been replaced with a single-line override setting all elements to 20px font size. This removes all existing theme variables, custom properties, and design system tokens that were carefully structured in the original file. This approach will break responsive design, accessibility features (users who need custom font sizes), and makes the application unmaintainable. Consider using CSS custom properties to scale the base font size while preserving the existing design system.
    web-app/src/services/providers/tauri.ts:1
  • The nullish coalescing operator ?? [] is applied after the .filter() call, which means if .list() returns null/undefined and .then() isn't called, the filter will throw. The fallback should wrap the entire chain or handle the promise rejection properly.
    web-app/src/hooks/useThreadScrolling.tsx:1
  • Adding scrollContainerRef to the dependency array of useEffect is incorrect. Refs are stable objects and should not be dependencies. This will cause the effect to re-run unnecessarily when the ref object identity changes, potentially leading to duplicate event listeners.
    web-app/src/hooks/useThreadScrolling.tsx:1
  • Same issue as above - scrollContainerRef should not be in the dependency array. Refs don't change identity in a way that should trigger effects.
    web-app/src/hooks/useThreadScrolling.tsx:1
  • Same issue - scrollContainerRef should not be in the dependency array.
    web-app/src/containers/RenderMarkdown.tsx:1
  • [nitpick] The change from template string replacement to function concatenation is unnecessary and less readable. The original '\\$$1' was clearer and more idiomatic for regex replacements.
    web-app/src/containers/DownloadButton.tsx:1
  • The useEffect now depends on modelId but the original implementation had an empty dependency array, meaning it should only run once on mount. If modelId can change during the component's lifetime, this could lead to duplicate event listeners being registered without cleanup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +23
if let Some(existing_token) = download_manager.cancel_tokens.remove(task_id) {
log::info!("Cancelling existing download task: {task_id}");
existing_token.cancel();
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Removing and cancelling an existing download task without waiting for the cancellation to complete could lead to race conditions. The new download might start before the previous one fully cleans up its resources. Consider awaiting the cancellation or ensuring proper cleanup.

Copilot uses AI. Check for mistakes.
Comment on lines +93 to +100
#[cfg(windows)]
use std::os::windows::process::CommandExt;

let mut cmd = Command::new("tasklist");
cmd.args(&["/FI", &format!("PID eq {}", pid), "/NH"]);

#[cfg(windows)]
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

[nitpick] The #[cfg(windows)] attribute is used twice - once for the import and once for the method call. While this works, it's cleaner to wrap the entire Windows-specific block in a single #[cfg(windows)] to improve readability.

Copilot uses AI. Check for mistakes.
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.

8 participants