Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ The Web app resolves the favicon dynamically so it follows the active System / L

## What's New in v1.6.1

- **Personal Navigation Station (Public Page)**: Customize your public homepage (`/`) from **Settings → Public Page** (`/api/settings/public-page`) with a custom site title/subtitle, default layout (`grid`, `compact`, or `list`), search bar + external web search engine switcher (`Filter`, `Google`, `Bing`, `GitHub`, `DuckDuckGo`, `百度`), category navigation pills, and new-tab behavior. Visitors can switch layout, theme, and language locally without mutating owner data.
- **Personal Navigation Station (Public Page)**: Customize your public homepage (`/`) from **Settings → Public Page** (`/api/settings/public-page`) with a custom site title/subtitle, default layout (`grid`, `compact`, or `list`), search bar + external web search engine switcher (`Filter`, `Google`, `Bing`, `GitHub`, `DuckDuckGo`, `百度`), category navigation pills, new-tab behavior, and up to 24 ordered **Pinned Favorites** (`pinnedBookmarkIds`). Visitors can switch layout, theme, language, and per-category collapse state (`dockmarkPublicCollapsedV1`, with **Collapse/Expand all** and automatic expansion while searching) locally without mutating owner data.
- **Dedicated Settings → AI Service (`/app/settings/ai`)**: Configure OpenAI-compatible AI providers in one central panel with 6 one-click presets (`OpenAI`, `DeepSeek`, `OpenRouter`, `SiliconFlow`, `Gemini`, `Groq`), D1-synced non-secret endpoint/model/timeout settings (`/api/settings/ai`), live `DOCKMARK_AI_API_KEY` Worker secret diagnostics, and quick links to Inbox AI Triage and Bookmarks Organize.
- **Duplicate Review Archive/Undo & SPA Hash-Route Safety**: Duplicate detection preserves distinct SPA hash routes (e.g. `#/login` vs `#/monitoring`) while collapsing plain document anchors (`#section-1` vs `#section-2`). Compare pairs side-by-side with URL diff highlighting, filter by evidence type or Pinyin search, jump directly to **Locate in Library** (`/app/bookmarks?q=...`), and run 1-click **Keep A · Archive B** / **Keep B · Archive A** with inline Change Journal undo.
- **Duplicate Review Tag/Description Merge, Archive/Undo & SPA Hash-Route Safety**: Duplicate detection preserves distinct SPA hash routes (e.g. `#/login` vs `#/monitoring`) while collapsing plain document anchors (`#section-1` vs `#section-2`). Compare pairs side-by-side with URL diff highlighting and `#tag` chips (highlighting tags unique to each side), filter by evidence type or Pinyin search, jump directly to **Locate in Library** (`/app/bookmarks?q=...`), and run 1-click **Keep A · Archive B** / **Keep B · Archive A** with optional pre-archive merging of unique tags (up to 12) and missing descriptions plus full inline **Undo** (restoring the archived bookmark and reverting any merged metadata).
- **Zero-Dependency Pinyin Initial Search**: Match Chinese bookmark, workspace, collection, tab, and `#tag` titles by Hanzi initials (e.g. typing `zhzl` finds `知乎专栏`) consistently across Web Launcher, Bookmark Library, Public Page, New Tab, and Extension Popup Open Tabs.
- **Modular WXT TypeScript New Tab & UI Polish**: Replaced the 7 legacy hand-patched New Tab scripts with a single WXT-compiled TypeScript bundle (`newtab-app.js` from `apps/extension/entrypoints/newtab-app.ts` + `lib/newtab/*.ts`) sharing `@dockmark/core`, paired with customizable launcher shortcuts (`⌘K` / `⌘J` / `Alt+K` + `/` focus), outer-only `:focus-within` composite search bars (zero inner focus outline), and unified custom `<select>` styling.

Expand Down
16 changes: 9 additions & 7 deletions apps/web/GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ src/main.tsx: SPA bootstrapper applying local appearance/locale before paint, bi
src/PrivateRoot.tsx: Session auth gate (`LoginCard`, `SetupRequired`) and sticky 46px private utility bar with inbox badge and 1-click theme/locale quick-toggles
src/App.tsx: Authenticated workspace shell with sticky 64px topbar, Raycast-style command bar (`!bang`, `@collection`, `#tag`, Pinyin initials, customizable `launcherShortcut`/`slashFocus`), keyboard-navigable results, and section router
src/LauncherDashboard.tsx: Command ranking (`buildLauncherResults`), keyboard-navigable `LauncherCommandPanel`, empty-query dashboard (open tabs, workspaces, filterable bookmarks), and `SafeFavicon`
src/PublicPage.tsx: Read-only Personal Navigation Station (`/`) loading `/api/settings/public-page` + `/api/public/bookmarks` with customizable site title/subtitle, Pinyin search + web engine switcher, category nav pills, visitor-local 3-way layout (`grid`/`compact`/`list`), `usePublicI18n()`, and local theme toggle
src/PublicPage.tsx: Read-only Personal Navigation Station (`/`) loading `/api/settings/public-page` + `/api/public/bookmarks` with customizable site title/subtitle, ordered `★ Pinned Favorites` section, collapsible category headers persisted in visitor-local `dockmarkPublicCollapsedV1` (with Collapse/Expand all and search auto-expand), Pinyin search + web engine switcher, category nav pills, visitor-local 3-way layout (`grid`/`compact`/`list`), `usePublicI18n()`, and local theme toggle
src/SettingsPage.tsx: Client-side `/app/settings/*` router coordinating 5 tabs: Appearance & Language, Browser, AI Service, Security, and Public Page
src/AppearanceSettings.tsx: Theme (`System / Light / Dark`) and Language (`System / English / 简体中文`) selector cards synced via `PATCH /api/settings/appearance`
src/BrowserSettingsManager.tsx: Local-first and D1-synced New Tab launcher limits, default engine, launcher shortcut (`⌘K`/`⌘J`/`Alt+K` + `/` focus), and bookmark conflict policy settings
src/AiProviderSettingsPage.tsx: Dedicated `/app/settings/ai` panel with 6 OpenAI-compatible provider presets, D1-synced non-secret endpoint/model/timeout form (`saveCloudAiSettings`), `DOCKMARK_AI_API_KEY` Worker secret status check, and Inbox/Organize quick links
src/AiProviderSettingsPage.tsx: Dedicated `/app/settings/ai` panel with 6 OpenAI-compatible provider presets, D1-synced non-secret endpoint/model/timeout form (`saveCloudAiSettings`), `Default / Local` vs `Cloud synced` state badge, wrapped `DOCKMARK_AI_API_KEY` Worker secret status check, and Inbox/Organize quick links
src/SecuritySettings.tsx: One-time extension pairing code generator and active/revoked paired-device management
src/PublicPageSettings.tsx: Personal Navigation Station appearance/behavior editor (`/api/settings/public-page`), single and bulk bookmark publication manager, and canonical category/bookmark public ordering
src/PublicPageSettings.tsx: Personal Navigation Station settings view orchestrating `PublicSiteConfigCard`, ordered `★ Pinned Favorites` curation (up to `MAX_PUBLIC_PINNED_BOOKMARKS = 24`), single and bulk bookmark publication, and canonical category/bookmark public ordering
src/PublicSiteConfigCard.tsx: Extracted top configuration card for `PublicPageSettings` editing public root (`/`) site title/subtitle, default layout, search bar, web search, category nav, and new-tab behavior
src/BrowserExtensionManager.tsx: Extension hub (`/app/extension`) with Chromium New Tab, Chromium Standard, and Firefox MV3 profiles, install guide, and live bridge diagnostics

## `src/` — Library, Workspace & Triage Managers
Expand All @@ -48,7 +49,8 @@ src/NativeBookmarkSyncPanels.tsx: Extracted mapping preview (`NativeMappingPrevi
src/InboxPage.tsx: Capture Inbox triage view with cloud-hydrated AI provider status, `/app/settings/ai` quick link, metadata review, and filing/archiving actions
src/InboxReviewCard.tsx: Single-bookmark Inbox review card handling filing, AI triage selection, and opt-in metadata suggestions
src/SmartCollectionsPage.tsx: Saved dynamic filter collection builder, live preview, and bulk handoff
src/DuplicateReviewPage.tsx: Duplicate URL group detector with Pinyin search, segmented evidence filters, side-by-side URL diff highlighting, 1-click Keep & Archive with Change Journal undo, and Locate in Library handoff
src/DuplicateReviewPage.tsx: Duplicate URL group review workbench with Pinyin search, segmented evidence filters, atomic-style tag/description merge + Keep & Archive execution, full Undo (restoring archived bookmark and reverting merged metadata), and Locate in Library handoff
src/DuplicateCandidateCard.tsx: Extracted duplicate pair comparison card (`computeDuplicateMerge`) displaying side-by-side URL diff highlighting, unique `#tag` chips, contextual merge preview toggle, and Keep/Archive actions

## `src/` — Client Data, Bridge, Theme & i18n Modules
src/i18n.ts: Web locale state (`dockmarkLocaleV1`, `dockmarkPublicLocaleV1`), cloud sync, `useI18n()`, and visitor-only `usePublicI18n()`
Expand All @@ -63,7 +65,7 @@ src/bookmark-details-api.ts: Composite bookmark + tag mutation API client
src/bookmark-search.ts: Tokenized bookmark, `#tag`, and Hanzi Pinyin initial client-side search predicates
src/bookmark-transfer.ts: Netscape HTML and Dockmark JSON bookmark parsers and serializers
src/change-journal-api.ts: Change journal listing API client
src/duplicate-review-api.ts: Duplicate group listing (`iconUrl`, timestamps) and resolution API client
src/duplicate-review-api.ts: Duplicate group listing (`iconUrl`, `tags`, timestamps) and resolution API client
src/inbox-api.ts: Capture Inbox listing, count, filing, and `INBOX_CHANGED_EVENT` broadcaster
src/library-batch-api.ts: Bulk library category/tag batch API client
src/library-maintenance-api.ts: Archived bookmark listing and bulk maintenance API client
Expand All @@ -80,10 +82,10 @@ src/theme.css: Dark (`#0a0f0c`) and light (`#f4f7f5`) semantic `--dm-*` design t
src/ui-polish.css: Outer-only `:focus-within` rings for composite search boxes (zero inner outline), custom SVG-chevron `<select>` styling, reusable `.dm-search-box`, and light-theme surface alignment
src/light-theme-consistency.css: Light-theme overrides for Extension, Transfer, Auth, and Public Page curation cards
src/responsive-shell.css: Sticky 46px utility bar, sticky 64px topbar (`top: 46px`), 128px sticky sidebar offset, and 900/720/520px responsive nav rules
src/settings.css: 5-tab Settings subnav, preference cards, AI provider preset grid, segmented controls, and public curation layout styles
src/settings.css: 5-tab Settings subnav, preference cards, overflow-safe AI provider/secret grid, segmented controls, and public pinning/curation layout styles
src/security.css: Private utility bar, quick theme/locale pills, auth screens, and paired-device list styles
src/extension.css: Extension hub hero, profile cards, installation guide, diagnostics, and compact launcher nudge strip
src/public-page.css: Personal Navigation Station topbar, visitor controls, Pinyin/web search bar, category nav pills, and `grid`/`compact`/`list` layouts
src/public-page.css: Personal Navigation Station topbar, visitor controls, Pinyin/web search bar, category nav pills, `★ Pinned Favorites` section, collapsible group headers, and `grid`/`compact`/`list` layouts
src/*.css (feature sheets): Scoped styles for `ai-organization`, `bookmark-tags`, `bridge`, `change-journal`, `duplicate-review`, `health`, `inbox`, `library-bulk`, `maintenance`, `reorder`, `search-engines`, `session`, `smart-collections`, `transfer`, and `workspaces`

[PROTOCOL]: Update this header on change, then check GEMINI.md
45 changes: 27 additions & 18 deletions apps/web/src/AiProviderSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,13 @@ export function AiProviderSettingsPage() {
</p>
</div>
<div className="settings-sync-state">
<strong>{isDirty ? tx("Unsaved edits", "有未保存修改") : tx("Cloud synced", "云端已同步")}</strong>
<strong>
{isDirty
? tx("Unsaved edits", "有未保存修改")
: settings.updatedAt
? tx("Cloud synced", "云端已同步")
: tx("Default / Local", "默认配置")}
</strong>
<span>{loading ? tx("Loading AI settings…", "正在加载配置…") : formatSyncTime(settings.updatedAt, locale, tx)}</span>
</div>
</div>
Expand Down Expand Up @@ -333,29 +339,32 @@ export function AiProviderSettingsPage() {
</div>

<div className="ai-status-row">
<span
className={`ai-status-badge ${
apiKeyConfigured === true
? "is-ready"
<div className="ai-status-meta">
<code className="ai-secret-name">DOCKMARK_AI_API_KEY</code>
<span
className={`ai-status-badge ${
apiKeyConfigured === true
? "is-ready"
: apiKeyConfigured === false
? "is-missing"
: ""
}`}
>
<span className="status-dot" aria-hidden="true" />
{apiKeyConfigured === true
? tx("Ready", "已就绪")
: apiKeyConfigured === false
? "is-missing"
: ""
}`}
>
<span className="status-dot" aria-hidden="true" />
{apiKeyConfigured === true
? tx("DOCKMARK_AI_API_KEY · Ready", "DOCKMARK_AI_API_KEY · 已配置 Ready")
: apiKeyConfigured === false
? tx("DOCKMARK_AI_API_KEY · Missing", "DOCKMARK_AI_API_KEY · 未配置 Missing")
: tx("Checking status…", "正在检测状态…")}
</span>
? tx("Not set", "未配置")
: tx("Checking…", "检测中…")}
</span>
</div>
<button
className="secondary"
className="secondary ai-recheck-btn"
type="button"
disabled={checkingKey || loading}
onClick={() => void recheckStatus()}
>
{checkingKey ? tx("Checking…", "检测中…") : tx("Recheck status", "重新检测状态")}
{checkingKey ? tx("Checking…", "检测中…") : tx("Recheck", "重新检测")}
</button>
</div>

Expand Down
Loading
Loading