Skip to main content

max / goingson

Delete the day-detail panel, which never had a container to render into .month-day-detail was flagged as dead CSS while pruning what layout.css replaces. The rule was the visible end of a whole inert feature: no element ever carried the class or the id, so toggleDayDetail's opening getElementById returned null and the function returned before doing anything. Every month cell carried data-act="eventsCalendar.toggleDayDetail", so clicking a day dispatched into that early return. Gone with it: the function and its export, the hide-on-month-change branch that null-checked the same missing element, the data-act and data-date the cells carried only to reach it, and the CSS for the subtree it would have built (.cal-day-detail-event, .cal-day-detail-task, .cal-detail-time, .cal-detail-location, .no-events-day). Behaviour is unchanged: clicking a month cell did nothing before and does nothing now.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-10 14:08 UTC
Signed with PGP, not checked
Commit: cf99dffd83c70df064b26de85c9d881bb2efc604
Parent: d997a1c
2 files changed, +1 insertion, -97 deletions
@@ -2659,9 +2659,6 @@
2659 2659 .review-intro--weekly {
2660 2660 margin: var(--gap-peer) 0 var(--gap-section);
2661 2661 }
2662 - .no-events-day {
2663 - color: var(--content-secondary);
2664 - }
2665 2662 .loading--error { color: var(--danger); }
2666 2663 .project-dashboard-desc {
2667 2664 color: var(--content-secondary);
@@ -9125,57 +9122,12 @@
9125 9122 text-decoration: line-through;
9126 9123 }
9127 9124
9128 - .cal-day-detail-task .cal-detail-time {
9129 - font-weight: 600;
9130 - }
9131 -
9132 - .cal-day-detail-task.overdue .cal-detail-time {
9133 - color: var(--danger);
9134 - }
9135 -
9136 - .cal-day-detail-task.done .cal-detail-title {
9137 - color: var(--content-muted);
9138 - text-decoration: line-through;
9139 - }
9140 -
9141 9125 .cal-event-more {
9142 9126 font-size: var(--font-size-xxs);
9143 9127 color: var(--content-secondary);
9144 9128 padding: var(--step-hair) var(--step-tight);
9145 9129 }
9146 9130
9147 - /* Month Day Detail */
9148 - .month-day-detail {
9149 - margin-top: var(--gap-section);
9150 - border: var(--border-width) solid var(--border);
9151 - padding: var(--gap-group);
9152 - background: var(--surface-raised);
9153 - box-shadow: var(--bevel-raised);
9154 - }
9155 -
9156 - .cal-day-detail-event {
9157 - display: flex;
9158 - gap: var(--gap-bound);
9159 - padding: var(--gap-peer) 0;
9160 - border-bottom: var(--border-width) solid var(--border);
9161 - cursor: pointer;
9162 - }
9163 -
9164 - .cal-day-detail-event:hover {
9165 - background: var(--surface-overlay);
9166 - }
9167 -
9168 - .cal-detail-time {
9169 - font-weight: 600;
9170 - white-space: nowrap;
9171 - min-width: 100px;
9172 - }
9173 -
9174 - .cal-detail-location {
9175 - color: var(--content-secondary);
9176 - font-size: var(--font-size-base);
9177 - }
9178 -
9179 9131 /* Week Grid */
9180 9132 .cal-week-grid {
9181 9133 border: var(--border-width) solid var(--border);
@@ -166,7 +166,7 @@
166 166 if (!isCurrentMonth) classes.push('other-month');
167 167 if (isToday) classes.push('today');
168 168
169 - html += `<div class="${classes.join(' ')}" data-date="${escAttr(dateKey)}" data-act="eventsCalendar.toggleDayDetail" data-a1="${escAttr(dateKey)}">`;
169 + html += `<div class="${classes.join(' ')}">`;
170 170 html += `<div class="cal-month-cell-header"><span class="cal-day-number">${cursor.getDate()}</span></div>`;
171 171
172 172 // Events first, then what is due: the day's fixed points, then the
@@ -196,53 +196,6 @@
196 196
197 197 html += '</div></div>';
198 198 container.innerHTML = html;
199 -
200 - // Hide day detail when month changes
201 - const detail = document.getElementById('month-day-detail');
202 - if (detail) detail.classList.add('hidden');
203 - }
204 -
205 - function toggleDayDetail(dateKey) {
206 - const detail = document.getElementById('month-day-detail');
207 - if (!detail) return;
208 -
209 - if (detail.dataset.date === dateKey && !detail.classList.contains('hidden')) {
210 - detail.classList.add('hidden');
211 - return;
212 - }
213 -
214 - const eventsByDate = groupByDate(monthEvents);
215 - const dayEvents = eventsByDate.get(dateKey) || [];
216 - const dayTasks = groupTasksByDueDate(monthTasks).get(dateKey) || [];
217 - const dateObj = new Date(dateKey + 'T12:00:00');
218 - const dayLabel = dateObj.toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' });
219 -
220 - let html = `<h3>${esc(dayLabel)}</h3>`;
221 - if (dayEvents.length === 0 && dayTasks.length === 0) {
222 - html += '<p class="no-events-day">Nothing on this day.</p>';
223 - } else {
224 - dayEvents.forEach(e => {
225 - const blockClass = e.blockType ? `block-${e.blockType}` : '';
226 - html += `<div class="cal-day-detail-event ${blockClass}" data-act="events.open" data-a1="${escAttr(e.id)}">
227 - <span class="cal-detail-time">${esc(e.timeFormatted)}</span>
228 - <span class="cal-detail-title">${esc(e.title)}</span>
229 - ${e.location ? `<span class="cal-detail-location">${esc(e.location)}</span>` : ''}
230 - </div>`;
231 - });
232 - dayTasks.forEach(t => {
233 - const overdue = t.isOverdue ? ' overdue' : '';
234 - const done = t.status === 'Completed' ? ' done' : '';
235 - html += `<div class="cal-day-detail-task${overdue}${done}" data-act="taskOverview.open" data-a1="${escAttr(t.id)}">
236 - <span class="cal-detail-time">Due</span>
237 - <span class="cal-detail-title">${esc(t.title)}</span>
238 - ${t.projectName ? `<span class="cal-detail-location">${esc(t.projectName)}</span>` : ''}
239 - </div>`;
240 - });
241 - }
242 -
243 - detail.dataset.date = dateKey;
244 - detail.innerHTML = html;
245 - detail.classList.remove('hidden');
246 199 }
247 200
248 201 function prevMonth() { currentMonthDate.setMonth(currentMonthDate.getMonth() - 1); loadMonth(); }
@@ -478,7 +431,6 @@
478 431 prevWeek,
479 432 nextWeek,
480 433 goToThisWeek,
481 - toggleDayDetail,
482 434 };
483 435
484 436 })();