garage44.eu/jeroen/midas

logclone: git clone https://garage44.eu/jeroen/midas.git

cartopolis-agent · 2026-11-26T11:48:11Z

fix(web): a session's projects get room of their own in the nav

The project tags sat inline after a session's title, in one line that
truncated as a whole: the tag was cut off ("pinnacle…") or, given room,
squeezed the title to "Pi…" for a session of three projects. The title
now has the first line, truncated if it must, and the projects a small
second line under it; the tags are filled rather than outlined, and on
the open session's row take the accent's own text colour.
web/src/app.css                 | 37 +++++++++++++++++++++++++++++++++++--
 web/src/components/sessions.tsx |  3 ++-
 2 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/web/src/app.css b/web/src/app.css
index 2a6edd0..9053403 100644
--- a/web/src/app.css
+++ b/web/src/app.css
@@ -659,9 +659,42 @@ code {
     white-space: nowrap;
 }
 
+/* A session's row in the nav: its title on the first line, truncated if it must;
+   its projects under it, small, so neither crowds the other out. */
+.m-nav-item:has(.nav-row__title) {
+    padding-block: 5px;
+}
+
+.m-nav-item .m-nav-item__label:has(.nav-row__title) {
+    display: flex;
+    flex-wrap: wrap;
+    align-items: center;
+    gap: 3px var(--m-space-1);
+}
+
+.nav-row__title {
+    flex: 1 0 100%;
+    min-width: 0;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
 .m-nav-item .ptag {
-    margin-left: var(--m-space-1);
-    vertical-align: 1px;
+    flex: none;
+    border: 0;
+    border-radius: 5px;
+    padding: 0 6px;
+    background: var(--m-hover);
+    color: var(--m-text-dim);
+    font-size: 11px;
+    font-weight: 600;
+    line-height: 1.6;
+}
+
+/* On the open session's row, which is the accent: a tag of the accent's own text colour. */
+.m-nav-item[aria-current='page'] .ptag {
+    background: color-mix(in srgb, var(--m-on-accent) 22%, transparent);
+    color: var(--m-on-accent);
 }
 
 /* All · cartopolis · podium · midas: what the board and the list show, never what runs.
diff --git a/web/src/components/sessions.tsx b/web/src/components/sessions.tsx
index 6f1bf3c..5e1d5ee 100644
--- a/web/src/components/sessions.tsx
+++ b/web/src/components/sessions.tsx
@@ -1997,7 +1997,8 @@ function navRow(h: Hosted, g: Group, id: string): m.Vnode {
             onclick={() => go(`sessions/${h.id}`)}
             icon={markOf(h, g)}
         >
-            {h.title}
+            {/* The title gives way, never the project: the tag stays whole at the row's end. */}
+            <span class="nav-row__title">{h.title}</span>
             {shown() ? null : projectTag(reposOf(h))}
         </NavItem>
     )