av9ash/GitBugs huggingface dataset:
Bug: Intermittent leakcheck | default 488 bytes leaked (Mutex, nsThread)
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2024-08-26 15:59:02+00:00
Resolved: 2024-11-25 12:12:10+00:00

**Filed by:** tszentpeteri [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=471774450&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/BK0RSuW8QKKeDoSCIPADAQ/runs/0/artifacts/public/logs/live_backing.log

---
```
[task 2024-08-26T14:45:45.970Z] 14:45:45     INFO - TEST-PASS | leakcheck | tab no leaks detected!
[task 2024-08-26T14:45:45.970Z] 14:45:45     INFO - leakcheck | Processing leak log file /tmp/tmpq8ukhlgp.mozrunner/runtests_leaks.log
[task 2024-08-26T14:45:45.971Z] 14:45:45     INFO - 
[task 2024-08-26T14:45:45.972Z] 14:45:45     INFO - == BloatView: ALL (cumulative) LEAK AND BLOAT STATISTICS, default process 17676
[task 2024-08-26T14:45:45.972Z] 14:45:45     INFO - 
[task 2024-08-26T14:45:45.973Z] 14:45:45     INFO -      |<----------------Class--------------->|<-----Bytes------>|<----Objects---->|
[task 2024-08-26T14:45:45.973Z] 14:45:45     INFO -      |                                      | Per-Inst   Leaked|   Total      Rem|
[task 2024-08-26T14:45:45.974Z] 14:45:45     INFO -    0 |TOTAL                                 |       44      488|146237517        2|
[task 2024-08-26T14:45:45.975Z] 14:45:45     INFO -  761 |Mutex                                 |       72       72|  196289        1|
[task 2024-08-26T14:45:45.977Z] 14:45:45     INFO - 2467 |nsThread                              |      416      416|    1974        1|
[task 2024-08-26T14:45:45.978Z] 14:45:45     INFO - 
[task 2024-08-26T14:45:45.978Z] 14:45:45     INFO - nsTraceRefcnt::DumpStatistics: 2590 entries
[task 2024-08-26T14:45:45.979Z] 14:45:45     INFO - TEST-INFO | leakcheck | default leaked 1 Mutex
[task 2024-08-26T14:45:45.980Z] 14:45:45     INFO - TEST-INFO | leakcheck | default leaked 1 nsThread
[task 2024-08-26T14:45:45.980Z] 14:45:45     INFO - TEST-UNEXPECTED-FAIL | leakcheck | default 488 bytes leaked (Mutex, nsThread)
[task 2024-08-26T14:45:45.980Z] 14:45:45     INFO - 
[task 2024-08-26T14:45:45.981Z] 14:45:45     INFO - leakcheck | Processing leak log file /tmp/tmpq8ukhlgp.mozrunner/runtests_leaks_tab_pid21239.log
[task 2024-08-26T14:45:45.982Z] 14:45:45     INFO - TEST-PASS | leakcheck | tab no leaks detected!
```
Bug: Search bar history is recorded in address bar instead
Status: RESOLVED
Priority: --
Resolution: INVALID
Created: 2024-08-26 17:04:27+00:00
Resolved: 2024-08-29 21:30:50+00:00

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

Address and search bar are separate.
1. Enter a search term in the search bar and press Enter.
2. Move focus to the address bar by pressing Alt+D.


Actual results:

Observe that the address box history dropdown contains the search term just entered in the search box when it shouldn't.


Expected results:

No item should have been entered into the address box history.
Bug: View>Sidebar options duplicate on pref flip and add other sidebar panels that aren't enabled
Status: RESOLVED
Priority: P3
Resolution: FIXED
Created: 2024-08-26 18:31:54+00:00
Resolved: 2024-11-07 14:23:14+00:00

STR: Go to Firefox labs in about:preferences. Select and unselect "sidebar" a few times. Go to View > Sidebar in your OS. You should see that the sidebar options duplicate every time "sidebar" is selected.
Bug: No search suggestions in address bar when only one character is entered
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2024-08-26 20:09:17+00:00
Resolved: 2024-08-30 12:53:21+00:00

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

Type one letter into the address bar


Actual results:

Browse history, search history, and Firefox suggestions appear


Expected results:

Search suggestions should appear (Google is my default search engine), but instead the search suggestions only appear if I enter two or more characters into the address bar
Bug: The tab-hover-preview-popup glitches across your screen (out from under your mouse and outside Firefox window entirely) when tabstrip rapidly animates e.g. for open-new-tab
Status: NEW
Priority: --
Created: 2024-08-26 20:15:13+00:00
Resolved: 2024-08-26 20:25:46+00:00

STR:
1. Start Firefox with a fresh profile (for simplicity/reproducibility)
2. Open a bunch of new tabs (e.g. hold Ctrl+T for 5 seconds or so)
3. Switch back to the first tab in the window (so that the tabstrip is scrolled all the way to the left)
4. Hover some tab on your tabstrip to see a preview.
5. Ctrl+T to open a new tab.
6. (optional) Close that tab with Ctrl+W.
7. (optional) Repeat steps 5-6

ACTUAL RESULTS:
* Steps 5-6 cause the tab-strip to rapidly scroll to its far opposite extreme, which is fine...
* ...but the tab preview popup stays visible (for a little while) and seems to move with its tab, which means it dances out from under your cursor and often outside of the Firefox window entirely.
* ...and after a moment, the popup disappears and a new one opens for whatever-tab-is-under-your-cursor, and that one instantly dances away as well.

EXPECTED RESULTS:
Probably we should hide the tab preview immediately before the tab-strip animates, and refuse to show a preview until it's stopped animating?
Bug: Incorrect translation between English and Croatian
Status: RESOLVED
Priority: --
Resolution: MOVED
Created: 2024-08-27 02:17:55+00:00
Resolved: 2024-08-27 15:24:26+00:00

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:131.0) Gecko/20100101 Firefox/131.0

Steps to reproduce:

1. open about:translations
2. select the languages English and Croatian
3. copy-paste the following text into the left text field: “Are you Indian? Are you Native American?”


Actual results:

Firefox translates the text to the following: “Jesi li ti Indijanac? Jesi li ti Indijanac?”


Expected results:

The translation should be “Jesi li ti Indijac? Jesi li ti Indijanac?”

Indian = Indijac
Native American = Indijanac
Bug: Vertical tabs do not show drop indicator when dragging text between tabs or tabs between windows
Status: NEW
Priority: P2
Created: 2024-08-27 13:49:33+00:00
Resolved: 2025-03-05 08:09:36+00:00

STR:
1. Set `sidebar.verticalTabs = true` and `sidebar.revamp = true`.
2. Select some text and drag it into the sidebar between tabs.

Expected:
Drop indicator appears between tabs.

Actual:
Extra space appears at top which shifts tabs down but no drop indicator appears between tabs. 

The drop operation still works despite the lack of visible drop indicator.
Bug: firefox.com/pair doesn't work if there's an open but unloaded tab for about:preferences
Status: NEW
Priority: P3
Created: 2024-08-27 16:19:31+00:00
Resolved: 2024-10-03 20:07:22+00:00

### Steps to reproduce

1. Open a new tab, go to about:preferences.
2. Switch to another tab.
3. Restart Firefox (note: you need to have it configured to reload your tabs)
4. Open a new tab and go to firefox.com/pair
5. Click the button to start the process

=> The existing page about:preferences opens, but then it just sits there doing nothing.

### Expected behavior

The QR code appears.

### Actual behavior

The QR code doesn't appear.

### Device information

* Firefox version: 131 20240827093141
* Android device model: (This is Desktop Linux)
* Android OS version: N/A

### Any additional information?
Bug: Sidebar animations need to take content zoom level into account
Status: VERIFIED
Priority: P1
Resolution: FIXED
Created: 2024-08-27 18:34:17+00:00
Resolved: 2025-02-07 10:28:41+00:00

STR:

In a recent Nightly (with the animations from bug 1898251 available), with sidebar and vertical tabs enabled:

1. Visit any site, and set the zoom level to > 100%.
2. Open the sidebar to initiate the animation

ER:

The sidebar animation to translate a capture of the content area horizontally, and cover the entire content area while doing so.

AR:

The captured screenshot seems to be hardcoded to 100% scale, and so its size doesn't fully cover the content area when zoomed at > 100%. When the content area zoomed < 100%, the screenshot is still captured at 100% scale, so the overlap is correct (but the scaling between capture and content area is not).
Bug: Sidebar button can get into an inverted active state
Status: VERIFIED
Priority: P2
Resolution: FIXED
Created: 2024-08-27 18:36:22+00:00
Resolved: 2024-09-05 07:32:43+00:00

STR:

In a recent Nightly with sidebar and vertical tabs enabled:

1. Click on the sidebar button to expose the full sidebar
2. Click on the sidebar button again to collapse the sidebar.

ER:

The sidebar button after step 2 should be in the inactive state.

AR:

The sidebar button is still in the active state for me. Clicking it again opens the sidebar up and puts the button into the inactive state, which I suspect is the reverse of what we want.
Bug: Opening new window, while there is only an open Firefox Private Browsing window, has unexpected behavior.
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2024-08-27 18:50:22+00:00
Resolved: 2024-09-02 15:56:43+00:00

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

- Close all Firefox windows.
- Open a Private Browsing Window.
- Change Desktop (in Windows 11, using Ctrl+Win+Right)
- Open a normal Firefox window.
- This does NOT happen if there is any additional Firefox window open. Otherwise, this happens 100% of the time.

Note: this has been happening for a long while, much before the current version (129).


Actual results:

The new window opens in the previous desktop. It also restores any tabs that were open in the first step. I have the "Open previous windows and tabs" setting disabled.


Expected results:

The new window should open in the current desktop, and without restoring the previous tabs.
Bug: Version 129 Search Window with alternate engines on the toolbar does not work. It does not allow for other search engines. This was a very handy feature that I hope will return with the next update (129.03?).
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2024-08-27 21:14:54+00:00
Resolved: 2024-08-27 21:47:34+00:00

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0

Steps to reproduce:

Try to use search engines in search engine window (see attachment). Not even Google can be accessed there any longer. 


Actual results:

No response. I have reinstalled version 128.
Bug: Version 129 Search Window with alternate engines on the toolbar does not work. It does not allow for other search engines. This was a very handy feature that I hope will return with the next update (129.03?).
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2024-08-27 21:15:48+00:00
Resolved: 2024-08-27 21:47:18+00:00

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0

Steps to reproduce:

Try to use search engines in search engine window (see attachment). Not even Google can be accessed there any longer. 


Actual results:

No response. I have reinstalled version 128.
Bug: The ingest logic for detecting newly enabled Suggest suggestions is broken
Status: RESOLVED
Priority: P1
Resolution: FIXED
Created: 2024-08-27 23:45:33+00:00
Resolved: 2024-08-29 16:09:21+00:00

In bug 1907696 I added some logic to `BaseFeature` that tries to ingest only newly enabled suggestion types when `update()` is called. It doesn't work right because by the time it [gets the old enabled suggestion types](https://searchfox.org/mozilla-central/rev/7c7e11a8e0352b0110923e86b873e4a26e3b0650/browser/components/urlbar/private/BaseFeature.sys.mjs#217-226), prefs/variables have already changed, so `isRustSuggestionTypeEnabled()` reflects the *new* enabled status, not the old. So later when it [tries to ingest only newly enabled suggestion types](https://searchfox.org/mozilla-central/rev/7c7e11a8e0352b0110923e86b873e4a26e3b0650/browser/components/urlbar/private/BaseFeature.sys.mjs#237-249), it won't because it will think those types were already enabled.

This isn't a huge problem because it only affects features that manage more than one suggestion type, and only when one type was already enabled, i.e., only when the feature itself was already enabled. `AdmWikipedia` is the only feature that manages multiple types. So to trigger this, the user would have to have sponsored enabled, nonsponsored disabled, and then turn on nonsponsored (or vice versa). And even then, ingest on startup isn't affected, so the worst case is that they might end up with slightly outdated AMP or Wikipedia suggestions.
Bug: White border appears at top of content area when OS Theme is Dark
Status: VERIFIED
Priority: P1
Resolution: FIXED
Created: 2024-08-28 01:24:00+00:00
Resolved: 2024-09-30 06:52:29+00:00

Steps to reproduce:
1. Set OS theme to Dark
2. Start Firefox

Actual results:
White border appears on top of content area.
See attached screenshot.

Expected results:
It should be darker.




Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=936f3047272d1ef5feb4f02953db3ad74c59bbd1&tochange=95109305b579922c59ef5966e60c9397e48847ac
Bug: Waterfox posratble -p start up. . Firefocx should be the same
Status: RESOLVED
Priority: --
Resolution: INVALID
Created: 2024-08-28 02:10:01+00:00
Resolved: 2024-08-28 07:15:01+00:00

Using  waterfox start up with -p as a portable version. Plz check in Firefox - should be the same problem.
When I start the app with -p (for Portable) option I am getting a pop up screen - Chose user Profile  screen. After choosing one profile and selecting Use the selected profile without asking at startup. - IT WILL STILL ASK! it does always ask. how to stop it asking ?
 I removed all of the profiles , have only one now to resolve the issue . No luck Still the pop up screen get on asking for profile.
Bug: screenshot name is too long
Status: RESOLVED
Priority: P3
Resolution: INVALID
Created: 2024-08-28 02:17:01+00:00
Resolved: 2024-09-13 12:12:21+00:00

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

1. Open a pdf file with a very long name (more than 250 characters) with Firefox
2. Take a screenshot of said PDF file
3. Save the screenshot on your computer


Actual results:

while I can open and view the screenshot through windows photo viewer and Firefox, I cannot rename, modify or delete the file at all. I suspect the problem is because the file name is too long.

My screenshot has this name: Screenshot 2024-08-28 at 08-53-16 Japanese Sentence Patterns for JLPT N3 Training Book (Japanese Sentence Patterns Training Book) - Japanese Sentence Patterns for JLPT N3 Training Book -- Noboru Akuzawa -- Japanese Sentence Patterns Training Book[...].png


Expected results:

The screenshot file taken by Firefox should have their names trimmed down if too long
Bug: Weird white border when system theme is enabled
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2024-08-28 02:30:16+00:00
Resolved: 2024-08-28 05:53:16+00:00

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0

Steps to reproduce:

1. Enable dark theme in Windows 10
2. Go to `about:addons` and enable "system theme -- auto"


Actual results:

A weird white border appeared under the toolbar.
https://i.imgur.com/BpOjx6I.png


Expected results:

There is no white borders if you go to `about:addons` and enable "Dark" theme:
https://i.imgur.com/NXaJ6s7.png
Bug: Web pages become unresponsive after pasting the “warning text”
Status: VERIFIED
Priority: --
Resolution: FIXED
Created: 2024-08-28 08:40:05+00:00
Resolved: 2024-09-24 09:26:03+00:00

**Found in**
* 131.0a1 (2024-08-27)

**Affected versions**
* 131.0a1 

**Preconditions**
* Download the DLP test assets from https://drive.google.com/file/d/1yjqVRuxdKV3WnO7D2wzMgDXBuYBxUgVw/view 
* Create a distribution folder inside the Firefox folder and paste the policies-1.json to it and then rename it to policies.json
* Run the DLP agent in CMD using: .\content_analysis_sdk_agent.exe --user --toblock=.\d{3}-?\d{2}-?\d{4}. --towarn=.warn. --delays=10

**Tested platforms**
* Affected platforms: Windows 10/11
* Unaffected platforms: Ubuntu, macOS 

**Steps to reproduce**
1. Go to https://drive.google.com/drive/home/https://onedrive.live.com/login/   and sign in
2. Open up a document in an external program (for example Notepad) and type “warning text” into it and copy it (or in any text field from a different tab)
3. Go back to Google Drive/OneDrive and open a Google Docs/Word document
4. Paste the “warning text” and select any option from the Warn dialog
5. Observe the behavior

**Expected result**
*  Based on the selected option the content gets pasted or not. The page does not become unresponsive

**Actual result**
*  The page becomes unresponsive after selecting an option from the Warn dialog

**Regression range**
* Last good build: 2024-08-21
* First bad build: 2024-08-22
* Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=b0f83f459abf3f6588e42aa71b222cda02a94b6c&tochange=d906de157f374a6bc8f03790b7bf8832b69e3fe0 
* Potentially regressed by: 1912384

**Additional notes**
* See the attached video
* If having other Google Docs opened in different tabs, they become blank and do not recover until closed
* Also reproducing if pasting the “warning text” on random websites multiples times in a row
Bug: Firefox DLP scans the pasted content multiple times when copied from Google/OneDrive Documents
Status: VERIFIED
Priority: --
Resolution: FIXED
Created: 2024-08-28 08:42:11+00:00
Resolved: 2025-03-03 12:30:39+00:00

**Found in**
* 131.0a1 (2024-08-27)

**Affected versions**
* 131.0a1 

**Preconditions**
* Download the DLP test assets from https://drive.google.com/file/d/1yjqVRuxdKV3WnO7D2wzMgDXBuYBxUgVw/view 
* Create a distribution folder inside the Firefox folder and paste the policies-1.json to it and then rename it to policies.json
* Run the DLP agent in CMD using: .\content_analysis_sdk_agent.exe --user --toblock=.\d{3}-?\d{2}-?\d{4}. --towarn=.warn. --delays=10

**Tested platforms**
* Affected platforms: Windows 10/11
* Unaffected platforms: Ubuntu, macOS 

**Steps to reproduce**
1. Go to https://drive.google.com/drive/home and sign in
2. Open up a Google Doc and type “ok text” into it and copy it (or any random text)
3. Open a second Google Doc or navigate to a random website (e.g. Wikipedia)
4. Paste the copied text from step 2
3. Observe the behavior

**Expected result**
*  The pasted content is scanned only once

**Actual result**
*  The pasted content is scanned 2-3 times consecutively on website or even 4-5 times on Google Docs

**Regression range**
* Potentially regressed by 1912384, but I am not 100% sure, since I cannot determine the regression range using Mozregression

**Additional notes**
* See the attached video
* Also reproducing if pasting a selected text into Google Docs / OndeDrive docs from a random website (the content is scanned twice)
* Also reproducing for the blocked DLP data (e.g. ‘123456789’) / warning DLP data (‘warning text’) - the content is scanned multiple times
* Not reproducing if pasting from Notepad
Bug: Blocked dialog displayed when pasting random text from Google Docs
Status: RESOLVED
Priority: --
Resolution: INVALID
Created: 2024-08-28 08:44:36+00:00
Resolved: 2024-08-28 15:20:32+00:00

**Found in**
* 131.0a1 (2024-08-27)

**Affected versions**
* 131.0a1 

**Preconditions**
* Download the DLP test assets from https://drive.google.com/file/d/1yjqVRuxdKV3WnO7D2wzMgDXBuYBxUgVw/view 
* Create a distribution folder inside the Firefox folder and paste the policies-1.json to it and then rename it to policies.json
* Run the DLP agent in CMD using: .\content_analysis_sdk_agent.exe --user --toblock=.\d{3}-?\d{2}-?\d{4}. --towarn=.warn. --delays=10

**Tested platforms**
* Affected platforms: Windows 10/11
* Unaffected platforms: Ubuntu, macOS 

**Steps to reproduce**
1. Go to https://drive.google.com/drive/home and sign in
2. Open up a Google Doc and type “ok text”/”sample text”/any random word that should not be blocked by DLP and copy it 
3. Open a second Google Doc or navigate to a random website (e.g. Wikipedia)
4. Paste the copied text from step 2
5. Observe the behavior

**Expected result**
*  Blocked dialog is not shown after the content is scanned

**Actual result**
*  Blocked dialog is shown after the content is scanned (it gets pasted anyway, as it should)

**Regression range**
* Potentially regressed by 1912384, but I am not 100% sure, since I cannot determine the regression range using Mozregression

**Additional notes**
* See the attached video
* Not reproducing if pasting from Notepad or from other website
Bug: Dialogs opened with keyboard missing initial focus-visible outline
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2024-08-28 09:25:34+00:00
Resolved: 2024-08-28 09:31:02+00:00

# Steps to reproduce

1. Open "about:preferences".
2. Navigate with keyboard to "Manage Colors" button.
3. Press enter to open the sub-dialog.

Also works with other dialogs, like "Fonts" "Advanced".

# Result

No visible focus outline. Need to press Tab to see focus again, and shift-Tab to return to the same position.

# Expect

A focus outline on the focused element to visually know where the keyboard focus is.
Bug: "Scroll forwards" and "Open a new tab" UI elements disappear from the tab strip with many pinned tabs and many open tabs
Status: VERIFIED
Priority: --
Resolution: FIXED
Created: 2024-08-28 14:13:50+00:00
Resolved: 2024-09-12 06:54:06+00:00

In my Firefox browsing window, sometimes the "Scroll forwards" and "Open a new tab" UI elements disappear. Additionally, I can no longer scroll the set of open tabs by hovering over the tab strip and moving my trackpad from side to side. The "list all tabs" UI element is still present and is basically the only way to swap to a new tab. My other windows are unaffected.

I'm not sure what I'm doing when this happens, but I think it is just from opening new tabs (and maybe closing them) and not adjusting the width of the window. My browser window is about 90% of the width of my screen, but I have 18 pinned tabs, so the actual tab strip is only around 40% of the width of the screen.

This is a regression from some time in the last week. I think there was speculation it might be related to something Emilio was doing.

[Tracking Requested - why for this release]: very noticeable user facing regression. I've been hitting it a few times a day.
Bug: Telemetry adjustments for add image flow in PDFs (again)
Status: VERIFIED
Priority: P1
Resolution: FIXED
Created: 2024-08-28 16:04:25+00:00
Resolved: 2024-09-12 10:34:45+00:00

- pdfjs.image.alt_text.image_status_label_displayed: I'm seeing the event twice between clicking add image and image added, but if I click on the image later I don't see the event. I'd expect it to show only at the end of the image add flow and when the user clicks on image afterwards.
- we must add a new event `pdfjs.image.alt_text.ai_generation_check` with an extra key status which is a boolean indicating if the alt text is guessed thanks to ML.
- `pdfjs.image.alt_text_edit` must be updated each time the user changes the setting.
Bug: Reordered list of tools does not persist after browser restart
Status: NEW
Priority: P3
Created: 2024-08-28 16:28:40+00:00
Resolved: 2025-02-11 06:15:18+00:00

**Steps to Reproduce**
1. Enabled the revamped sidebar in Firefox Labs.
2. Click the gear icon to open the Customize panel.
3. Disable one of the tools, except the last one.
4. Re-enable the same tool.
5. Restart Firefox.

**Expected Results**
- After Step 4, the tool is added to the bottom of the sidebar.
- After Step 5, the tools are ordered in the same way they were in the previous step.

**Actual Result**
- After Step 4, the tool is added to the bottom of the sidebar. (This is correct.)
- After Step 5, the tool ordering is reset.

Visibility settings persist as expected.