Skip to content

Don't build toolbar search when toolbar is hidden - #1616

Merged
cdrini merged 2 commits into
internetarchive:masterfrom
cdrini:fix/1611-missing-search-icon
Oct 23, 2026
Merged

cdrini merged 2 commits into
internetarchive:masterfrom
cdrini:fix/1611-missing-search-icon

Conversation

@cdrini

@cdrini cdrini commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #1611. BookReader built the toolbar search form even with showToolbar: false (as on archive.org), so the browser fetched its icon anyway. The 404 itself comes from a stale imagesBaseURL in @internetarchive/ia-music-player's liner-notes config, which needs a separate fix there.

Technical

  • Only build the toolbar search when showToolbar is true.
  • Fix a double slash in the experiments menu icon URL.

Testing

Open http://localhost:8000/details/goodytwoshoes00newyiala and check the Network tab: no request for icon_search_button.svg. With ?options.showToolbar=true, toolbar search still works.

Screenshots/Videos

N/A, no visual change.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Avoids fetching icon_search_button.svg when showToolbar is false (internetarchive#1611)

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

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.65%. Comparing base (e0cd8b1) to head (69babdf).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1616      +/-   ##
==========================================
+ Coverage   64.63%   64.65%   +0.01%     
==========================================
  Files          69       69              
  Lines        6309     6309              
  Branches     1399     1400       +1     
==========================================
+ Hits         4078     4079       +1     
+ Misses       2191     2190       -1     
  Partials       40       40              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cdrini

cdrini commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Automerging, small low risk fix.

@cdrini
cdrini merged commit 042a0e4 into internetarchive:master Oct 23, 2026
10 checks passed
@cdrini
cdrini deleted the fix/1611-missing-search-icon branch October 23, 2026 22:04
@cdrini

cdrini commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Note this only incidentally fixes #1611 . The root cause is that the images base URL config needs to be set on archive.org to the correct production value.

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.

Image request erroring on production

2 participants