Skip to content

Feature/notion style UI#25

Merged
LinMoQC merged 3 commits intomainfrom
feature/notion-style-ui
Mar 24, 2026
Merged

Feature/notion style UI#25
LinMoQC merged 3 commits intomainfrom
feature/notion-style-ui

Conversation

@LinMoQC
Copy link
Copy Markdown
Owner

@LinMoQC LinMoQC commented Mar 24, 2026

Summary

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor / code cleanup
  • CI / tooling

Related issue

Closes #

Changes

How to test

Screenshots (if applicable)

Checklist

  • My code follows the project's coding conventions
  • I have run ./lyra lint and there are no type errors
  • I have added/updated tests for the changed functionality
  • I have updated the documentation if behavior changed
  • The PR title follows Conventional Commits format (feat:, fix:, etc.)
  • I have read the CONTRIBUTING.md

Summary by CodeRabbit

Release Notes

  • New Features

    • Launched desktop application with full feature set including notebooks, notes, AI chat panel, knowledge graph, and settings
    • Launched mobile application with notebooks, insights, knowledge graph, tasks, and chat functionality
    • Added theme presets (Lyra and Notion) for customizable app appearance
    • Enhanced writing assistance with new tools for continue-writing, material search, and title polishing
  • Improvements

    • Improved search and summarization with intelligent fallback mechanisms for better content retrieval
    • Enhanced copilot panel with persistent conversation context across messages

LinMoQC added 3 commits March 24, 2026 11:36
…ence

- Add Notion light/dark theme preset with accurate color variables (#191919, #202020, etc.)
- Add theme preset selector in Appearance settings (LyraNote / Notion)
- Replace next-themes localStorage with custom cookie-driven ThemeProvider
- Read theme and theme-preset cookies server-side in layout.tsx to eliminate flash on refresh
- Add i18n strings for theme preset options in en.json / zh.json

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lyra-note-web Ready Ready Preview, Comment Mar 24, 2026 5:30pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 61af2686-3c5b-48a0-97ca-66c29b711433

📥 Commits

Reviewing files that changed from the base of the PR and between 86c3f2d and acbac41.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (78)
  • apps/api/app/skills/builtin/search_knowledge.py
  • apps/api/app/skills/builtin/summarize.py
  • apps/desktop/index.html
  • apps/desktop/package.json
  • apps/desktop/postcss.config.js
  • apps/desktop/src-tauri/Cargo.toml
  • apps/desktop/src-tauri/src/lib.rs
  • apps/desktop/src-tauri/src/main.rs
  • apps/desktop/src-tauri/tauri.conf.json
  • apps/desktop/src/app.tsx
  • apps/desktop/src/components/ai-panel/ai-panel.tsx
  • apps/desktop/src/components/sidebar/sidebar.tsx
  • apps/desktop/src/components/titlebar/title-bar.tsx
  • apps/desktop/src/index.css
  • apps/desktop/src/layouts/main-layout.tsx
  • apps/desktop/src/lib/http-client.ts
  • apps/desktop/src/lib/utils.ts
  • apps/desktop/src/main.tsx
  • apps/desktop/src/pages/knowledge.tsx
  • apps/desktop/src/pages/login.tsx
  • apps/desktop/src/pages/notes.tsx
  • apps/desktop/src/pages/tasks.tsx
  • apps/desktop/src/store/use-auth-store.ts
  • apps/desktop/src/store/use-ui-store.ts
  • apps/desktop/tailwind.config.js
  • apps/desktop/tsconfig.json
  • apps/desktop/tsconfig.node.json
  • apps/desktop/vite.config.ts
  • apps/mobile/app.json
  • apps/mobile/app/(app)/_layout.tsx
  • apps/mobile/app/(app)/index.tsx
  • apps/mobile/app/(app)/knowledge.tsx
  • apps/mobile/app/(app)/notebooks/[id]/chat.tsx
  • apps/mobile/app/(app)/notebooks/[id]/index.tsx
  • apps/mobile/app/(app)/notebooks/_layout.tsx
  • apps/mobile/app/(app)/notebooks/index.tsx
  • apps/mobile/app/(app)/settings.tsx
  • apps/mobile/app/(app)/tasks.tsx
  • apps/mobile/app/(auth)/_layout.tsx
  • apps/mobile/app/(auth)/login.tsx
  • apps/mobile/app/_layout.tsx
  • apps/mobile/app/index.tsx
  • apps/mobile/babel.config.js
  • apps/mobile/lib/http-client.ts
  • apps/mobile/lib/storage.ts
  • apps/mobile/lib/theme.ts
  • apps/mobile/package.json
  • apps/mobile/store/use-auth-store.ts
  • apps/mobile/tsconfig.json
  • apps/web/messages/en.json
  • apps/web/messages/zh.json
  • apps/web/src/app/globals.css
  • apps/web/src/app/layout.tsx
  • apps/web/src/app/providers.tsx
  • apps/web/src/components/settings/sections/appearance-section.tsx
  • apps/web/src/components/ui/theme-toggle.tsx
  • apps/web/src/features/copilot/copilot-panel.tsx
  • apps/web/src/lib/theme-preset.tsx
  • apps/web/src/lib/theme.tsx
  • packages/api-client/package.json
  • packages/api-client/src/index.ts
  • packages/api-client/src/lib/client.ts
  • packages/api-client/src/lib/mappers.ts
  • packages/api-client/src/lib/routes.ts
  • packages/api-client/src/lib/sse.ts
  • packages/api-client/src/services/ai.ts
  • packages/api-client/src/services/auth.ts
  • packages/api-client/src/services/conversations.ts
  • packages/api-client/src/services/notebooks.ts
  • packages/api-client/src/services/notes.ts
  • packages/api-client/src/services/sources.ts
  • packages/api-client/tsconfig.json
  • packages/types/package.json
  • packages/types/src/constants.ts
  • packages/types/src/index.ts
  • packages/types/tsconfig.json
  • pnpm-workspace.yaml
  • turbo.json

📝 Walkthrough

Walkthrough

Major expansion introducing two new client applications (Tauri desktop and Expo mobile) alongside shared packages for API client and type definitions. API skill fallbacks added for chunk retrieval. Web app enhanced with theme presets and localization updates.

Changes

Cohort / File(s) Summary
API Skill Improvements
apps/api/app/skills/builtin/search_knowledge.py, apps/api/app/skills/builtin/summarize.py
Added fallback chunk retrieval logic when primary retrieval paths yield no results. Introduced _fetch_chunks_direct() static methods joining Chunk/Source tables with database filtering and direct queries returning mapped chunk dicts with fixed scores.
Shared Type Definitions
packages/types/...
New @lyranote/types package exporting domain types (Notebook, Source, Message, etc.), categorical constants (ChatRole, SourceStatus, etc.), and timing/truncation constants across Web/Desktop/Mobile platforms.
Shared HTTP Client & Services
packages/api-client/...
New @lyranote/api-client package providing platform-agnostic Axios-based HTTP client with envelope handling, response interception, and SSE streaming support. Exports service factories (auth, notebooks, notes, sources, conversations, AI) with standardized async methods and request/response mapping.
Desktop App—Configuration & Tooling
apps/desktop/package.json, apps/desktop/tsconfig.json, apps/desktop/tsconfig.node.json, apps/desktop/vite.config.ts, apps/desktop/tailwind.config.js, apps/desktop/postcss.config.js, apps/desktop/index.html
New Tauri desktop app setup with React, TypeScript, Vite, Tailwind CSS, and custom theme color tokens (sidebar, surface, brand). Defines build scripts, dev server on port 1420, and dark mode support.
Desktop App—Tauri Backend
apps/desktop/src-tauri/Cargo.toml, apps/desktop/src-tauri/src/lib.rs, apps/desktop/src-tauri/src/main.rs, apps/desktop/src-tauri/tauri.conf.json
Rust Tauri crate with system tray support, window management commands (show_window, hide_window), notification/store plugins, and app configuration including window size, tray icon, and security policy (CSP null).
Desktop App—React Frontend
apps/desktop/src/main.tsx, apps/desktop/src/app.tsx, apps/desktop/src/index.css, apps/desktop/src/lib/..., apps/desktop/src/store/...
React entrypoint with QueryClient setup, auth initialization, HTTP client management, and UI store (Zustand) for navigation/selection state. Includes CSS custom properties for theming and dark mode.
Desktop App—UI Components & Layouts
apps/desktop/src/components/..., apps/desktop/src/layouts/main-layout.tsx
TitleBar (Tauri drag region, window controls), Sidebar (notebook list, navigation), AiPanel (streaming chat), and MainLayout composing the app structure. Routes conditionally render Notes/Knowledge/Tasks pages.
Desktop App—Pages
apps/desktop/src/pages/login.tsx, apps/desktop/src/pages/notes.tsx, apps/desktop/src/pages/knowledge.tsx, apps/desktop/src/pages/tasks.tsx
Login form with server URL input, Notes editor with create/update mutations, and placeholder Knowledge/Tasks pages with "coming soon" UI.
Mobile App—Configuration & Tooling
apps/mobile/app.json, apps/mobile/package.json, apps/mobile/tsconfig.json, apps/mobile/babel.config.js
New Expo mobile app with React Native, TypeScript, Expo Router, secure storage, and adaptive icons. Includes dev/build/preview scripts and configured dark UI style.
Mobile App—Theme & Storage
apps/mobile/lib/theme.ts, apps/mobile/lib/storage.ts, apps/mobile/lib/http-client.ts
Shared color/font/spacing theme constants, secure persistent storage for token and server URL, and mobile HTTP client factory with error handling and Expo Router navigation redirects.
Mobile App—Stores & Entry
apps/mobile/store/use-auth-store.ts, apps/mobile/app/_layout.tsx, apps/mobile/app/index.tsx
Zustand auth store, root layout with token validation on mount and QueryClient setup, and conditional loading/routing redirects to auth/app stacks.
Mobile App—Auth & Navigation
apps/mobile/app/(auth)/_layout.tsx, apps/mobile/app/(auth)/login.tsx, apps/mobile/app/(app)/_layout.tsx
Auth guard layout redirecting authenticated users, login form with server URL field, and bottom-tab navigator with emoji-based icons for Notes/Notebooks/Knowledge/Tasks/Settings.
Mobile App—Screens
apps/mobile/app/(app)/index.tsx, apps/mobile/app/(app)/notebooks/..., apps/mobile/app/(app)/knowledge.tsx, apps/mobile/app/(app)/settings.tsx, apps/mobile/app/(app)/tasks.tsx
Home screen with AI insights, notebook list and detail screens with notes CRUD, knowledge graph entity display, settings with profile/sign-out, and tasks placeholder.
Mobile App—Chat Feature
apps/mobile/app/(app)/notebooks/[id]/chat.tsx
Notebook-scoped AI chat with streaming message support, conversation persistence, abort controls, and error handling. Displays chat timeline with empty state and textarea input.
Web App—Localization
apps/web/messages/en.json, apps/web/messages/zh.json
Added i18n keys for AI writing prompts, theme preset selection UI, panel docking options, and editor assistance controls (continue writing, polish, search material, etc.).
Web App—Theme System
apps/web/src/lib/theme.tsx, apps/web/src/lib/theme-preset.tsx, apps/web/src/app/globals.css
New custom theme provider replacing next-themes with cookie-based persistence. Added Notion preset theme colors. Introduced theme preset context with Lyra/Notion variants and CSS overrides.
Web App—Layout & Providers
apps/web/src/app/layout.tsx, apps/web/src/app/providers.tsx, apps/web/src/components/settings/sections/appearance-section.tsx, apps/web/src/components/ui/theme-toggle.tsx
Root layout reads theme/preset cookies and applies HTML attributes. Providers wired to custom ThemeProvider and ThemePresetProvider. AppearanceSection added preset buttons with SVG icons. ThemeToggle refactored to use local hook without mount gating.
Web App—Copilot & Styling
apps/web/src/features/copilot/copilot-panel.tsx, apps/web/src/app/globals.css
Copilot panel now persists conversation across messages within a notebook via copilotConvId. CSS added TipTap block hover/select styling and Tippy animation rules. Added hide-scrollbar utility class.
Workspace Configuration
pnpm-workspace.yaml, turbo.json
Workspace includes expanded to cover apps/desktop, apps/mobile, packages/types, packages/api-client. Turbo tasks configuration added persistent tauri task with caching disabled.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Desktop as Desktop App<br/>(Tauri/React)
    participant Mobile as Mobile App<br/>(Expo/React Native)
    participant API as API Server
    participant DB as Database

    User->>Desktop: Launch desktop app
    Desktop->>Desktop: Load auth token from localStorage
    Desktop->>API: GET /auth/me (validate session)
    API-->>Desktop: User profile + metadata
    Desktop->>Desktop: Initialize auth store & render MainLayout

    User->>Mobile: Launch mobile app
    Mobile->>Mobile: Load token from SecureStore
    Mobile->>API: GET /auth/me (validate session)
    API-->>Mobile: User profile + metadata
    Mobile->>Mobile: Initialize auth store & render app stacks

    User->>Desktop: Select notebook → view notes
    Desktop->>API: GET /notebooks/{id}/notes
    API->>DB: Query notes for notebook
    DB-->>API: Notes list
    API-->>Desktop: Notes with titles/content
    Desktop->>Desktop: Render notes editor

    User->>Mobile: Navigate to notebook detail
    Mobile->>API: GET /notebooks/{id} + /notebooks/{id}/notes
    API->>DB: Query notebook & notes
    DB-->>API: Notebook + notes data
    API-->>Mobile: Notebook detail + notes
    Mobile->>Mobile: Render notebook with notes list

    User->>Desktop: Send AI chat message
    Desktop->>API: POST /conversations/{convId}/messages (stream)
    API->>API: createConversationService.streamMessage()
    API-->>Desktop: SSE token stream
    Desktop->>Desktop: readSseStream accumulates tokens
    Desktop->>Desktop: Render streaming response in AiPanel

    User->>Mobile: Send notebook chat message
    Mobile->>API: POST /conversations/{convId}/messages (stream)
    API-->>Mobile: SSE response stream
    Mobile->>Mobile: readSseStream updates ChatScreen messages
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐰 Hop! Two new apps spring to life—
Desktop swift, Mobile light,
Shared types and clients in place,
Web themes now bloom with grace,
The monorepo takes flight!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/notion-style-ui

@LinMoQC LinMoQC merged commit b66e74b into main Mar 24, 2026
4 of 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