Commit Graph

36 Commits

Author SHA1 Message Date
Arvin Xu
d2a042cd95 🐛 fix: scroll ChatInput into view when starter mode activates (#12334)
* 🐛 fix: scroll ChatInput into view when starter mode activates

When clicking Create Agent/Group/Write, the SuggestQuestions panel
renders below the ChatInput and pushes total content beyond the
viewport, causing the ChatInput to scroll out of view. This adds
scrollIntoView + focus on mode change so the editor stays visible
and ready for input. Also improves E2E test to target contenteditable
inside ChatInput directly and wait for animation to settle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 22:06:14 +08:00
Rdmclin2
2bf0a08919 feat: support model detail dropdown (#12275)
* feat: support model detail dropdown

# Conflicts:
#	src/features/ChatInput/ActionBar/Model/index.tsx

* chore: fix test cases

* fix: type error

* fix: e2e tests
2026-02-12 17:51:52 +08:00
Rdmclin2
6c342525e9 feat: add write starter and fix e2e tests (#11992)
* feat: add write document and image create starter

* chore: update doc starter e2e tests

* chore: remove image stater form home input

* chore: move model header to actionbar extra place

* test: fix e2e test
2026-02-11 12:58:43 +08:00
Arvin Xu
338df4baf9 📝 docs: Update src directory structure to be more comprehensive (#12016)
* update e2e test

* 📝 docs: Update src directory structure to be more comprehensive

- Add missing directories: business, const, envs, helpers, tools
- Add missing root files: auth.ts, instrumentation.ts, instrumentation.node.ts, proxy.ts
- Update descriptions to be more accurate
- Sync changes across English and Chinese documentation

Fixes #9521
2026-01-31 22:42:30 +08:00
Arvin Xu
42339cd6d0 test: fix e2e issue (#11761)
fix selector
2026-01-24 02:44:45 +08:00
YuTengjing
1eff8646f7 feat: remove NextAuth (#11732) 2026-01-23 23:57:08 +08:00
YuTengjing
395595a2c8 feat: remove Clerk authentication code (#11711) 2026-01-23 14:41:22 +08:00
Innei
d450dd9742 🐛 fix: improve e2e server and complete i18n resources (#11678)
- Refactor webServer.ts with better process coordination and lock file mechanism
- Add mock S3 env vars to prevent initialization errors
- Complete missing i18n translations across all locales
2026-01-21 17:37:25 +08:00
YuTengjing
5074fbef2c ♻️ refactor: optimize lobehub models and default configuration (#11621)
* ♻️ refactor: use COPYRIGHT constant from branding config

* ♻️ refactor: optimize default model configuration

- Switch default provider from OpenAI to Anthropic
- Add DEFAULT_MINI_MODEL and DEFAULT_MINI_PROVIDER for lightweight tasks
- Use mini model for system agent tasks: generationTopic, topic, translation, queryRewrite
- Use mini model for memory extraction agents
- Reorder provider list: Anthropic/Google first, local solutions last

* ♻️ refactor: split lobehub models into organized folder structure

- Split large lobehub.ts (1316 lines) into lobehub/ folder
- Organize chat models by provider (openai, anthropic, google, etc.)
- Separate image models and utils into dedicated files

* ♻️ refactor: use SOCIAL_URL constant and fix button alignment in auth-error page

*  feat: add MiniMax M2.1 and M2.1 Lightning models

* ♻️ refactor: remove 'enabled' property from image model configurations in lobehub

* ♻️ refactor: add COPYRIGHT_FULL constant and fix Discord icon visibility

*  test: update snapshots for default provider changes

*  test: fix snapshot provider values for CI environment

* 🐛 fix(e2e): intercept all LLM providers in mock instead of only OpenAI

The default provider was changed from openai to anthropic, but the LLM mock
only intercepted /webapi/chat/openai requests. Now it intercepts all providers.
2026-01-20 20:08:54 +08:00
Arvin Xu
560f5de026 test: fix e2e community (#11622)
* fix community

* improve

* fix pwa entry
2026-01-19 21:44:04 +08:00
Shinji-Li
7f004c5baf ♻️ refactor: change the /community/assistant to /agent routes (#11606)
* refactor: change the /community/assistant to /agent routes

* fix: slove the group detail page go back error

* fix: update the e2e test
2026-01-19 15:41:20 +08:00
Arvin Xu
ba34e92523 test: fix pages e2e test (#11594)
fix pages
2026-01-19 09:56:38 +08:00
Arvin Xu
171f328ff1 test: improve community e2e testing (#11534)
* improve community e2e testing

* fix steps
2026-01-18 21:31:05 +08:00
Innei
2253d46ee0 ♻️ refactor: migrate Next.js navigation APIs to React Router for SPA (#11394)
This implements Phase 3 of LOBE-2850, establishing a dual routing architecture
for the Next.js to Vite React Router SPA migration.

## Changes

### New wrapper modules
- `src/libs/next/` - Next.js wrappers for auth pages (Link, Image, navigation, dynamic)
- `src/libs/router/` - React Router wrappers for SPA routes (Link, navigation hooks)

### Link component updates
- External links (`http://`, `https://`) → native `<a>` tags
- SPA internal routes → React Router `<Link>`
- Auth pages → Next.js `<Link>` (preserved)
- Global `src/components/Link.tsx` → smart component for ConfigProvider

### Navigation hook updates
- SPA routes use `@/libs/router/navigation` (useRouter, usePathname, useSearchParams)
- Auth pages use `@/libs/next/navigation`
- GlobalProvider uses `window.location` (outside Router context)

### Architecture
```
GlobalProvider (no Router context)
└── AppTheme + ConfigProvider
    ├── Auth pages (Next.js routing)
    └── SPA Router (BrowserRouter)
        └── SPA pages (React Router)
```

Resolves LOBE-2850
2026-01-16 00:28:15 +08:00
Arvin Xu
033ca92011 🐛 fix: fix group ux and memory retriever (#11481)
* update topic

* update topic

* memory not block

* remove incorrectly memory fetch

* refactor group switch topic

* improve streaming style for Agent Tool display

* fix group tab active issue

* 🐛 fix: E2E test for switching conversations and TypeScript type errors

- Fix E2E test 'AGENT-CONV-002' that was failing when switching between conversations
  - Add detection for home page vs agent page state
  - Use correct selectors for Recent Topics cards on home page
  - Add proper wait time for messages to load after topic switch
  - Use '.message-wrapper' selector for message verification

- Fix TypeScript type errors in MakedownRender.tsx
  - Add explicit type annotations for a and img component props
  - Import ReactNode type

- Remove unused @ts-expect-error directive in useMarkdown.tsx

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 11:02:09 +08:00
Arvin Xu
8376a80584 🐛 fix: refresh sidebar after sendAsGroup and add E2E tests (#11450)
* fix actions

*  test: add E2E test for sendAsGroup sidebar refresh

Add E2E test to verify that after creating a Group from the Home page
input, the sidebar correctly displays the newly created Group when
returning to the Home page.

This test validates the fix for LOBE-3083 where the sidebar wasn't
refreshing after creating a Group via sendAsGroup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

*  test: rename sendGroup to starter and add Agent test

- Rename sendGroup.feature/steps to starter.feature/steps
- Add E2E test for sendAsAgent sidebar refresh
- Both Agent and Group creation now have E2E test coverage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 10:10:10 +08:00
Innei
be8dddd52d feat: improve baseline alignment for tool items (#11447)
*  feat: improve baseline alignment for tool items

Fix baseline alignment issue for KlavisServerItem and LobehubSkillServerItem components.

Fixes LOBE-2106

* refactor: improve next config modification logic by removing webVitalsAttribution and adding invariant checks to property removals.

Signed-off-by: Innei <tukon479@gmail.com>

* refactor: update category selection logic in community interactions steps

- Changed category selection from the second to the third category to better align with the actual category filters.
- Improved code readability by restructuring comments and formatting for better clarity.
- Enhanced logging for URL verification and initial card count checks.

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2026-01-13 00:02:30 +08:00
Arvin Xu
df1710bbed test: add page e2e testing (#11423)
* add page e2e

* move

* add more e2e for page

* update

* fix keyboard

* update
2026-01-12 15:41:02 +08:00
Arvin Xu
b12885a8d0 test: add E2E tests for Home sidebar Agent and Group management (#11421)
*  test: add E2E tests for Home sidebar Agent and Group management

- Add sidebarAgent.feature with rename/pin/delete scenarios
- Add sidebarGroup.feature with rename/pin/delete scenarios
- Add step definitions for Agent and Group operations
- Support @HOME- tag prefix in hooks.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix group renaming

* update setup scripts

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 01:13:53 +08:00
Arvin Xu
447b546e7a test: open all e2e testing (#11282)
* update

* fix agent testing

* fix conversation

* update e2e

* update e2e

* update

* update testing

* fix testing
2026-01-08 01:06:53 +08:00
Arvin Xu
9caa13776b ♻️ test: rename discover to community in e2e (#11274)
rename discover to community
2026-01-06 15:58:01 +08:00
Arvin Xu
0f889952dd 🐛 fix: fix model edit icon missing (#11105)
* 🐛 fix: fix model edit icon missing

* fix stats welcome

* refactor pglite db case

* fix e2e tests

* update docs
2026-01-02 20:12:19 +08:00
Arvin Xu
e3f0f46436 test: add more user journey (#11072)
*  test(e2e): add Agent conversation E2E test with LLM mock

- Add LLM mock framework to intercept /webapi/chat/openai requests
- Create Agent conversation journey test (AGENT-CHAT-001)
- Add data-testid="chat-input" to Desktop ChatInput for E2E testing
- Mock returns SSE streaming responses matching LobeChat's actual format

Test scenario: Enter Lobe AI → Send "hello" → Verify AI response

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* 📝 docs(e2e): add experience-driven E2E testing strategy

Add comprehensive testing strategy from LOBE-2417:
- Core philosophy: user experience baseline for refactoring safety
- Product architecture coverage with priority levels
- Tag system (@journey, @P0/@P1/@P2, module tags)
- Execution strategies for CI, Nightly, and Release
- Updated directory structure with full journey coverage plan

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

📝 docs(e2e): add E2E testing guide for Claude

Document key learnings from implementing Agent conversation test:
- LLM Mock SSE format and usage
- Desktop/Mobile dual component handling with boundingBox
- contenteditable input handling
- Debugging tips and common issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* 📝 docs(e2e): add experience-driven E2E testing strategy

Add comprehensive testing strategy from LOBE-2417:
- Core philosophy: user experience baseline for refactoring safety
- Product architecture coverage with priority levels
- Tag system (@journey, @P0/@P1/@P2, module tags)
- Execution strategies for CI, Nightly, and Release
- Updated directory structure with full journey coverage plan

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

📝 docs(e2e): add E2E testing guide for Claude

Document key learnings from implementing Agent conversation test:
- LLM Mock SSE format and usage
- Desktop/Mobile dual component handling with boundingBox
- contenteditable input handling
- Debugging tips and common issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* update sop

* update sop

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 23:53:25 +08:00
Arvin Xu
6e8d4ffbc7 ♻️ refactor: refactor oidc env to auth env (#11095)
♻️ refactor: refactor oidc to auth
2026-01-01 21:45:42 +08:00
Arvin Xu
8560a6bf29 test: agent e2e case for user journey (#11063)
*  test(e2e): add Agent conversation E2E test with LLM mock

- Add LLM mock framework to intercept /webapi/chat/openai requests
- Create Agent conversation journey test (AGENT-CHAT-001)
- Add data-testid="chat-input" to Desktop ChatInput for E2E testing
- Mock returns SSE streaming responses matching LobeChat's actual format

Test scenario: Enter Lobe AI → Send "hello" → Verify AI response

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* 📝 docs(e2e): add E2E testing guide for Claude

Document key learnings from implementing Agent conversation test:
- LLM Mock SSE format and usage
- Desktop/Mobile dual component handling with boundingBox
- contenteditable input handling
- Debugging tips and common issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* 📝 docs(e2e): add experience-driven E2E testing strategy

Add comprehensive testing strategy from LOBE-2417:
- Core philosophy: user experience baseline for refactoring safety
- Product architecture coverage with priority levels
- Tag system (@journey, @P0/@P1/@P2, module tags)
- Execution strategies for CI, Nightly, and Release
- Updated directory structure with full journey coverage plan

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* add conversation case

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 10:10:40 +08:00
Arvin Xu
a9a93c15ae test: fix e2e tests for new product flow (#11060)
* add e2e tests

* fix workflow

* update workflow

* 🐛 fix(e2e): fix smoke tests i18n and timeout issues

- Unify default port to 3006 across hooks.ts and world.ts
- Reduce step timeout from 30s to 10s for faster feedback
- Fix i18n matching for featured sections (support zh-CN/en-US)
- Add mock framework foundation for future API mocking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* 🐛 fix(e2e): save failure screenshots to file for CI artifacts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* 🐛 fix(e2e): move PORT to global env for consistent access

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* 🐛 fix(e2e): set onboarding as completed for test user

Skip onboarding flow by setting finishedAt in test user seed
2025-12-31 02:13:32 +08:00
arvinxx
2da0691d4e 🔧 chore: update basic config 2025-12-24 12:54:35 +08:00
Innei
bde9bde17c 🔨 chore: integrate code inspector plugin and update turbopack configuration (#10588)
* feat: integrate code inspector plugin and update turbopack configuration

Signed-off-by: Innei <tukon479@gmail.com>

* chore: add e2e env

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-12-05 14:35:11 +08:00
renovate[bot]
8da7cc4418 Update all non-major dependencies (#10372)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-30 19:39:26 +08:00
renovate[bot]
fd93f6d0c7 Update dependency node to v24.11.1 (#10327)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-21 14:18:45 +08:00
renovate[bot]
b76e3c85b9 Update all non-major dependencies (#10177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-17 09:56:56 +08:00
Arvin Xu
b0dd7be095 test: add more discover bdd tests (#10048)
add bdd tests
2025-11-04 20:32:09 +08:00
Arvin Xu
5c9baf490f test: add more smoke bdd tests (#10014)
add more smoke bdd tests
2025-11-03 21:24:46 +08:00
YuTengjing
44776b40bc 👷 build: nodejs 24 (#10003)
* build: upgrade node 24

* build: run pnpm update

* fix: tsgo not support baseUrl
2025-11-03 12:56:15 +08:00
Arvin Xu
b6f1fc4a14 test: add BDD test framework and initial tests with Playwright and Cucumber (#9843)
* try with bdd test

* update

* update

* add workspace

* update

* fix

* ci

* ci

* fix

* update

* update

* update parallel

* update config

* ️ perf: increase e2e timeout to 120 seconds

Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>

* update config

* more parallel

* fix parallel

* fix tests

* refactor to improve performance

* fix

* fix

* fix

* refactor with tsx

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-23 02:15:24 +08:00
Arvin Xu
8693d95e0d 🔨 chore: add e2e workflow (#9677)
* add e2e test

* Potential fix for code scanning alert no. 137: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* remove

* update

* fix tests

* add e2e

* update

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-14 13:32:52 +08:00