3bcf86a0995e5a15ad5a2a8ff5533f48d5d43653
max
  Fri Sep 18 07:15:28 2026 -0700
hgTracks: tell the user what a session load just did, refs #38157

#Preview2 week - bugs introduced now will need a build patch to fix
When a saved session is loaded it replaces the whole cart, and the view the
user had before is gone without a word.  hgTracks now shows a note on that
page saying which session was opened, who saved it and when, the session
description if it has one, and that the previous configuration cannot be
brought back.  Only on that one page: cart.c leaves a marker when a full
(non-merge) session load happens and hgTracks takes it out again.
Recommended track sets merge into the cart, so they get no note.

The note uses a new notifBoxOnce() in utils.js, which has only a Close
button: a one-page message does not need 'Don't show again'.  Its .notifBoxOnce
style is the card grey of the new Sessions page, and it sets no width, so
unlike the other notifBoxes it cannot stick out of the window.

Switch off with sessionLoadNotice=off in hg.conf.

diff --git src/hg/htdocs/style/HGStyle.css src/hg/htdocs/style/HGStyle.css
index 4b78759460d..e9ae7abad97 100644
--- src/hg/htdocs/style/HGStyle.css
+++ src/hg/htdocs/style/HGStyle.css
@@ -952,30 +952,41 @@
 }
 
 #warnHead {
     color: DarkRed;
 }
 
 /* like warnBox, but under the menu, not in the middle of the screen */
 .notifBox {
     background-color: beige;
     border: 1px solid grey;
     padding: 5px;
     margin: 5px;
     text-align: center;
 }
 
+/* a notifBox that is only shown on the page where something happened, e.g. after a session
+ * was loaded. Card grey of the Sessions page, and left-aligned, as the text is a paragraph */
+.notifBoxOnce {
+    background-color: #f6f8fa;
+    border: 1px solid #d0d0d0;
+    padding: 10px 14px;
+    /* the width is not set, so that the box cannot stick out to the right of the window */
+    margin: 5px 10px 5px 100px;
+    text-align: left;
+}
+
 /* For jquery-ui dialog box */
 div.warnDialog { border: 2px solid; }
 div.warnDialog .ui-dialog-titlebar { background-color: #FF8566; }
 div.warnDialog .ui-dialog-title { font-weight: bold; color: #000000; }
 div.warnDialog .ui-dialog-content { background-color: #FFFEE8; font-size: 1em; }
 div.warnDialog .ui-dialog-buttonpane { border-width: 0; text-align: center; }
 div.warnDialog .ui-dialog-buttonset { width: 100%; display: inline-block; }
 body > div.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable.ui-resizable * { font-size: 14px; }
 
 .centeredImage
 {
     text-align: center;
     margin-top: 0px;
     margin-bottom: 0px;
     padding: 0px;