perf: optimize first-screen rendering (#11718)

* ♻️ refactor: migrate SkillStore and IntegrationDetailModal to imperative API

- Refactor SkillStore to use createModal imperative API instead of declarative Modal
- Refactor IntegrationDetailModal to use createModal with IntegrationDetailContent
- Remove open/setOpen state management from all calling components
- Add modal-imperative.mdc rule for modal best practices
- Reduce code complexity and improve maintainability

* 🐛 fix: keep modal open during OAuth flow until connection completes

Close modal only after isConnected becomes true, not immediately after
handleConnect returns. This ensures useSkillConnect listeners stay alive
to detect OAuth completion via postMessage/polling.

* 🔧 chore: update dependencies and refactor markdown handling

- Updated "@lobehub/ui" to version "^4.27.4" in package.json.
- Replaced "markdown-to-txt" with a local utility "markdownToTxt" for converting markdown to plain text across multiple components.
- Refactored imports in various files to utilize the new markdownToTxt utility, improving code consistency and maintainability.

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

---------

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2026-01-23 14:41:07 +08:00
committed by GitHub
parent f45f508fbd
commit e999851592
27 changed files with 656 additions and 500 deletions
@@ -1,10 +1,11 @@
import { consola } from 'consola';
import { readJsonSync, writeJSONSync } from 'fs-extra';
import { markdownToTxt } from 'markdown-to-txt';
import { existsSync, readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import semver from 'semver';
import { markdownToTxt } from '@/utils/markdownToTxt';
import { CHANGELOG_DIR, CHANGELOG_FILE } from './const';
export interface ChangelogStaticItem {