Skip to content

Feature/change favico method#6

Open
KanoCifer wants to merge 10 commits into
HarryHello:mainfrom
KanoCifer:feature/change-favico-method
Open

Feature/change favico method#6
KanoCifer wants to merge 10 commits into
HarryHello:mainfrom
KanoCifer:feature/change-favico-method

Conversation

@KanoCifer

Copy link
Copy Markdown
Contributor

Change

  • 调整quicklink的图标获取方式
  • 为快捷链接添加删除按钮
  • 重构 getFaviconUrl,优先使用 Chrome favicon API,失败时回退到站点 favicon
  • 添加图片加载失败时的 fallback 链:chrome://favicon → /favicon.ico → 首字母头像

KanoCifer and others added 8 commits May 8, 2026 19:18
- Redesign all components to Material Design 3 spec
- Add collapsible MissionCard with chevron toggle and smooth animation
- Replace purple MD3 palette with Google Blue color system
- Update cards, buttons, inputs, modals, and drawer to MD3 surface containers
- Increase nav height to 64px and adjust layout spacing
- Center search form and quick links in DashboardHeader
Replace 2-theme system with 6 schemes (google-blue, forest-green,
paper, sage, mist, blush) × light/dark/auto via data-color-scheme
attribute. Migrate hardcoded colors in 8 components to CSS vars.
Add config v2 export/import with v1 backward compatibility.
…tem listener

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- add EditIcon component and delete button to QuickLinkFrame
- wire up delete event through QuickLinkItem to QuickLinks
- refactor getFaviconUrl to use Chrome favicon API with fallback
- add fallback chain: chrome://favicon → site/favicon.ico → letter avatar
- improve image error handling across components
- sort icon exports alphabetically
Copilot AI review requested due to automatic review settings May 20, 2026 10:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR modernizes theming and UI styling, adds better favicon handling, and introduces config v2 import/export while extending tab management (discard + better filtering).

Changes:

  • Introduces MD3-style color schemes + light/dark/auto mode persisted in the theme store and CSS theme files.
  • Updates favicon retrieval to support Chrome’s _favicon endpoint with fallback behavior, and adds "favicon" permission.
  • Adds discarded-tab support + improved “blank/new tab” filtering, plus config export/import v2 compatibility.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/helpers.ts Changes favicon helper API to return structured result with fallback.
src/utils/configs.ts Exports v2 config; imports v1/v2 with theme migration logic.
src/types/tab.ts Adds discarded flag to Tab type.
src/types/config.ts Adds configV2 schema including color scheme/mode.
src/stores/theme.ts Replaces legacy themeId with color scheme + mode (light/dark/auto), persists to storage.
src/stores/tabs.ts Filters excluded URLs centrally; tracks discarded; adds discardTab; updates tab update handling.
src/popup/PopupApp.vue Loads settings on mount; improves popup styling and adds button semantics.
src/components/tabs/PageChip.vue Adds discard action + styling for discarded tabs.
src/components/tabs/OverflowChips.vue Updates hover text color token.
src/components/tabs/OpenTabsSection.vue Updates empty-state tokens and typography.
src/components/tabs/MissionCard.vue Adds collapsible groups with animated height and toggle UI.
src/components/settings/SettingsPanel.vue Adds color scheme picker and mode selector UI.
src/components/layout/GroupNav.vue Uses new favicon helper with fallback-on-error logic; adjusts nav styling and highlight handling.
src/components/layout/Footer.vue Updates footer color token and adds top border.
src/components/layout/AppLayout.vue Adjusts layout padding for new header height.
src/components/icons/index.ts Reorders/extends icon exports (adds Edit/Zzz).
src/components/icons/ZzzIcon.vue Adds new icon component.
src/components/icons/EditIcon.vue Adds new icon component.
src/components/drawer/comp/NewTodo.vue Updates confirm button text color token.
src/components/drawer/TodoItem.vue Updates save button text color token.
src/components/drawer/SearchInput.vue Updates sizing and MD3 surface/outline tokens.
src/components/drawer/DrawerPanel.vue Updates overlay/background tokens and sizing.
src/components/drawer/DeferredItem.vue Updates favicon rendering to use helper result + fallback chain.
src/components/dashboard/QuickLinks.vue Wires delete event to store removal; minor style updates.
src/components/dashboard/QuickLinkItem.vue Uses favicon helper result + fallback chain; emits delete; adds hover styling.
src/components/dashboard/QuickLinkFrame.vue Replaces edit icon; adds delete control and event.
src/components/dashboard/DashboardHeader.vue Uses chrome.search.query with NEW_TAB disposition; layout refinements.
src/components/dashboard/Dashboard.vue Updates sticky header offset for new header height.
src/components/common/Switch.vue Updates switch handle background token.
src/components/common/ModalForm.vue Updates modal overlay + container styling tokens.
src/components/common/Checkbox.vue Updates checked icon color token.
src/assets/variables.scss Imports theme index CSS; introduces MD3 radius; recalculates active-bg.
src/assets/themes/index.css Adds theme bundle imports.
src/assets/themes/google-blue.css Adds Google Blue scheme variables (light/dark).
src/assets/themes/forest-green.css Adds Forest Green scheme variables (light/dark).
src/assets/themes/paper.css Adds Paper scheme variables (light/dark).
src/assets/themes/sage.css Adds Sage scheme variables (light/dark).
src/assets/themes/mist.css Adds Mist scheme variables (light/dark).
src/assets/themes/blush.css Adds Blush scheme variables (light/dark).
src/App.vue Awaits nextTick() before optionally closing duplicate new tabs.
package.json Bumps Vue/Pinia/Vite-related dependencies.
extension/manifest.json Adds "favicon" permission.
Comments suppressed due to low confidence (5)

src/utils/helpers.ts:1

  • FaviconOptions.domain is used as a general URL input (rawUrl is later passed as pageUrl= to Chrome’s _favicon/ endpoint). This is misleading and makes call sites pass full URLs into a domain field. Consider renaming the field to url/pageUrl, or expanding the type to explicitly express urlOrDomain to match actual usage.
    src/utils/helpers.ts:1
  • When chrome.runtime.getURL is unavailable, chromeUrl becomes an empty string but the function still returns source: 'chrome' and url: ''. Downstream <img :src> will attempt to load an empty URL (often triggering extra error handling and a pointless request). A more reliable contract is to return url: chromeUrl || fallbackUrl and set source based on what was chosen (e.g., 'chrome' vs 'default'), or use 'failed' when neither is usable.
    src/stores/tabs.ts:1
  • This logic can incorrectly merge two distinct tabs that share the same url within the same windowId, because it replaces an existing entry when index === -1 by matching only (url, windowId). The comment claims discard() changes tab IDs, but Chrome tab IDs are stable across discarding; this replacement is likely unnecessary and risks corrupting the in-memory tab list (leading to focus/close/discard acting on the wrong tab). Prefer removing the staleIndex replacement path and only push when tabId isn’t tracked; if you need dedupe, use tabId-based identity only.
    src/popup/PopupApp.vue:1
  • This element is now focusable and has role=\"button\", but it still only supports mouse clicks. For keyboard accessibility, also handle Enter/Space (e.g., @keydown.enter and @keydown.space.prevent) to trigger openNewTab.
    src/components/tabs/MissionCard.vue:1
  • The header is clickable but not keyboard-accessible (no tabindex, role, or key handling). Consider making the header a <button> (or adding appropriate ARIA/keyboard handlers) so users can collapse/expand with keyboard navigation.

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

Comment thread src/components/dashboard/QuickLinkItem.vue
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.

2 participants