Skip to content

fix: [Agent] The settings page contains inaccessible images. - #7775

Merged
shaohuzhang1 merged 1 commit into
v3from
pr@v3@fix_application
Nov 9, 2026
Merged

shaohuzhang1 merged 1 commit into
v3from
pr@v3@fix_application

Conversation

@shaohuzhang1

Copy link
Copy Markdown
Contributor

fix: [Agent] The settings page contains inaccessible images.

@shaohuzhang1
shaohuzhang1 merged commit f71488e into v3 Nov 9, 2026
4 of 6 checks passed
@shaohuzhang1
shaohuzhang1 deleted the pr@v3@fix_application branch November 9, 2026 10:24
<img :src="previewImages.float_icon || '/MaxKB.gif'" alt="" class="size-8 shrink-0 object-contain" />
<img :src="previewImages.float_icon || './MaxKB.gif'" alt="" class="size-8 shrink-0 object-contain" />
</div>
</template>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review of the diff

Change: /MaxKB.gif → ./MaxKB.gif

Issues / Concerns

  1. Semantic change in path resolution (likely a regression risk)

    • /MaxKB.gif is an absolute path resolved from the site root (e.g., https://host/MaxKB.gif).
    • ./MaxKB.gif is relative to the current route URL, not the app's base. In SPA/Vue Router setups (especially with history mode and nested routes), this can resolve to incorrect URLs such as /some/nested/route/MaxKB.gif, causing 404s.
    • If the intent was "path relative to the deployed app root," use import.meta.env.BASE_URL + 'MaxKB.gif' or a static asset import (import MaxKBIcon from '@/assets/MaxKB.gif').
  2. No leading slash vs. Vite/base-path handling

    • With Vite, public assets are served from BASE_URL. Hardcoding ./ bypasses base-path configuration and will break if the app is deployed under a subpath (e.g., /maxkb/). Prefer:
      const defaultIcon = `${import.meta.env.BASE_URL}MaxKB.gif`
      then use :src="previewImages.float_icon || defaultIcon".
  3. Hardcoded fallback logic in template

    • Better to move the fallback into a computed property for clarity and testability, e.g.:
      const floatIconSrc = computed(() => previewImages.value.float_icon || defaultIcon)
  4. Accessibility

    • The <img> uses empty alt="". Since it's a UI icon (not decorative in the strict sense — it likely conveys meaning), consider alt="MaxKB" or mark it role="presentation"/aria-hidden="true" explicitly if truly decorative.
  5. Minor: filename casing

    • MaxKB.gif mixes case; confirm the actual file is capitalized exactly this way on case-sensitive servers (Linux), otherwise it works locally (Windows/macOS) but fails in production.

Recommendation

Revert to /MaxKB.gif or, preferably, switch to a base-URL-aware reference or a bundled asset import to make the path robust across environments.

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