diff --git a/templates/artifacts/feed.html b/templates/artifacts/feed.html
index 5c37acb..c482a60 100644
--- a/templates/artifacts/feed.html
+++ b/templates/artifacts/feed.html
@@ -131,6 +131,15 @@
if (!feed) return;
let selectedView = "{{ selected_view }}";
+ // When a single source is selected, the row's source column is dropped
+ // (see .no-source-col), so the artifact sidebar needs ~7rem less width.
+ // The stored width is the "all sources" (wide) width; a selected source
+ // renders it minus this fixed offset. Dragging the splitter in either
+ // mode adjusts the stored width directly, so the width is settable in
+ // whichever mode you're in and the other mode tracks it by the offset.
+ const SOURCE_COL_WIDTH = 112; // 7rem, matches the dropped source column
+ const sourceSelected = Boolean(feed.dataset.selectedSource);
+
const sizes = {
days: Number(localStorage.getItem("daybook.daysWidth")) || 144,
artifacts: Number(localStorage.getItem("daybook.artifactsWidth")) || 280,
@@ -138,7 +147,10 @@
const applySizes = () => {
feed.style.setProperty("--days-width", `${sizes.days}px`);
- feed.style.setProperty("--artifacts-width", `${sizes.artifacts}px`);
+ const artifactsWidth = sourceSelected
+ ? Math.max(150, sizes.artifacts - SOURCE_COL_WIDTH)
+ : sizes.artifacts;
+ feed.style.setProperty("--artifacts-width", `${artifactsWidth}px`);
};
applySizes();