The back button often doesn’t work as you think it will. It seems to be mapped to the browser history back and not what the user often things is “back.” This has been fixed in some places (like fix back button in hassio addons by bramkragten · Pull Request #14161 · home-assistant/frontend · GitHub), but not everywhere.
Closed panel means broken history
I think the biggest gotcha is when you click on an item in the UI that opens a panel. Everything seems to get out of whack once a modal panel pops up. Sometimes once you close a panel if you click “back,” then the panel will pop up again or because of a dead history item clicking back just doesn’t do anything.
This is definitely a complicated behavior to wrap your head around, but I think in general a good rule could be that the back button should never attempt reopen a panel that does not require a URL change. Non-URL change items should not be entered into history because you can’t easily go back to them.
Example: Clicking on an entity in the device page opens a panel. Now close the panel by X’ing it out. Now hit the back button on that page. See? It didn’t do anything. Because there wasn’t a URL change, there is nowhere in history for it to go.
Users implicitly go back by retracing steps
If I close a panel by X’ing it out, should it be removed from history?
Example: I navigate to a page (not the devices page, which has a bug as previously noted), then click on something that opens a panel, then X out the panel, and then hit back. I expect to go up one page in this situation, not reopen the panel! By closing the panel, I am already going back. If the user perfectly backtracks the history by another method than hitting the browser back button, then those items should be removed from history as they trace them in order.
Missing distinction between up and back in the UI
Lastly, I think there also needs to be a distinction somehow between “up” and “back.” I don’t know how to solve this one exactly, but maybe next to the back button could be a link to the next up page. Or the back button could explicitly say where it is going back to?
Example: Open a device page. Copy the URL and paste it into a clean tab. Notice that there is no back/up button, as there is no history of the tab. Maybe we are missing a “back to integration” link there. There is an expectation that these pages have a normal or most frequent way of reaching them (like folders on a file system).
Thanks for reading! I think this covers the few main instances that I run into.