Skip to content

Commit ad634b3

Browse files
CalebisGrossclaude
andcommitted
feat: unified forum index — merge welcome+live feed, add Memory System section
Restructure the Forum page into a single cohesive index: 1. Merged Welcome Back + Live Activity into one compact header panel with inline event feed (collapsible, max 150px). 2. Removed separate Episodes, Memories, Patterns, Abstractions forabg blocks. These are now rows in a "Memory System" group in the forum index, alongside General, Agents, and Projects. 3. Clicking a Memory System row (e.g., "Episodes") navigates to a detail view showing that section's content with proper breadcrumbs. 4. The explore data sections are now hidden containers — their content is loaded on demand and rendered in the thread view when navigated to. Navigation flow: Forum Index → General/Agents/Projects/Memory System → Sub-forums → Threads → Posts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fb9ca12 commit ad634b3

1 file changed

Lines changed: 96 additions & 49 deletions

File tree

internal/web/static/index.html

Lines changed: 96 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,16 +1164,22 @@ <h2>What do you remember?</h2>
11641164

11651165
<!-- Forum View (replaces Explore) -->
11661166
<section class="view" id="view-explore">
1167-
<div id="forumWelcome" class="welcome-panel" style="display:none">
1168-
<div class="welcome-bar">Welcome Back</div>
1169-
<div class="welcome-body">
1167+
<div class="welcome-panel" id="forumWelcome" style="display:none">
1168+
<div class="welcome-bar" style="display:flex;align-items:center;justify-content:space-between">
1169+
<span style="display:flex;align-items:center;gap:6px"><span style="width:8px;height:8px;border-radius:50%;background:var(--accent-green);animation:pulse 2s ease-in-out infinite"></span> Welcome Back</span>
1170+
<span id="liveFeedCount" style="font-size:0.75rem;font-weight:normal;color:var(--text-dim)">waiting for events...</span>
1171+
</div>
1172+
<div class="welcome-body" style="display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px">
11701173
<span id="welcomeVisit"></span>
11711174
<div class="stats">
11721175
<span><span class="stat-val" id="welcomeActive">0</span> active</span>
11731176
<span><span class="stat-val" id="welcomeFading">0</span> fading</span>
11741177
<span><span class="stat-val" id="welcomeArchived">0</span> archived</span>
11751178
</div>
11761179
</div>
1180+
<div id="liveFeedBody" style="max-height:150px;overflow-y:auto;border-top:1px solid var(--border-subtle);margin-top:4px">
1181+
<div style="padding:4px 8px;color:var(--text-dim);font-size:0.78rem">Listening for agent activity...</div>
1182+
</div>
11771183
</div>
11781184
<div id="forumIndex">
11791185
<div style="padding:10px 16px;color:var(--text-dim);font-size:0.85rem">Loading forum index...</div>
@@ -1191,44 +1197,11 @@ <h2>What do you remember?</h2>
11911197
</div>
11921198
</div>
11931199
</div>
1194-
<div class="forabg" id="forumLiveFeed">
1195-
<div class="forabg-head">
1196-
<span class="forabg-title" style="display:flex;align-items:center;gap:6px"><span style="width:8px;height:8px;border-radius:50%;background:var(--accent-green);animation:pulse 2s ease-in-out infinite"></span> Live Activity</span>
1197-
<span class="forabg-meta" id="liveFeedCount">waiting for events...</span>
1198-
</div>
1199-
<div class="inner" id="liveFeedBody" style="max-height:300px;overflow-y:auto">
1200-
<div style="padding:8px 16px;color:var(--text-dim);font-size:0.82rem">Listening for agent activity...</div>
1201-
</div>
1202-
</div>
1203-
<div class="forabg">
1204-
<div class="forabg-head" onclick="this.nextElementSibling.classList.toggle('collapsed')">
1205-
<span class="forabg-title">Episodes</span>
1206-
<span class="forabg-meta" id="epCount"></span>
1207-
</div>
1208-
<div class="inner" id="section-episodes"><div style="padding:10px;color:var(--text-dim)">Loading...</div></div>
1209-
</div>
1210-
<div class="forabg">
1211-
<div class="forabg-head" onclick="this.nextElementSibling.classList.toggle('collapsed')">
1212-
<span class="forabg-title">Recent Memories</span>
1213-
<span class="forabg-meta" id="memCount"></span>
1214-
</div>
1215-
<div class="inner" id="section-memories"><div style="padding:10px;color:var(--text-dim)">Loading...</div></div>
1216-
</div>
1217-
<div class="forabg">
1218-
<div class="forabg-head" onclick="this.nextElementSibling.classList.toggle('collapsed')">
1219-
<span class="forabg-title">Discovered Patterns</span>
1220-
<span class="forabg-meta" id="patCount"></span>
1221-
</div>
1222-
<div class="inner" id="section-patterns"><div style="padding:10px;color:var(--text-dim)">Loading...</div></div>
1223-
</div>
1224-
<div class="forabg">
1225-
<div class="forabg-head" onclick="this.nextElementSibling.classList.toggle('collapsed')">
1226-
<span class="forabg-title">Abstractions &amp; Principles</span>
1227-
<span class="forabg-meta" id="absCount"></span>
1228-
</div>
1229-
<div class="inner" id="section-abstractions"><div style="padding:10px;color:var(--text-dim)">Loading...</div></div>
1230-
</div>
1231-
<input type="text" class="explore-search" id="exploreSearch" placeholder="Filter..." oninput="filterExplore()" style="margin:8px 16px;padding:4px 8px;background:var(--bg-primary);border:1px solid var(--border-subtle);color:var(--text-primary);font-size:0.85rem;border-radius:3px;width:calc(100% - 32px)">
1200+
<!-- Hidden containers for explore data (used by loadExploreTab but no longer shown directly) -->
1201+
<div style="display:none" id="section-episodes"></div>
1202+
<div style="display:none" id="section-memories"></div>
1203+
<div style="display:none" id="section-patterns"></div>
1204+
<div style="display:none" id="section-abstractions"></div>
12321205
</section>
12331206

12341207
<!-- Thread View (episode detail) -->
@@ -1719,18 +1692,11 @@ <h3>Activity</h3>
17191692
var crumbMap = { recall: 'Search', explore: 'Forum', timeline: 'Timeline', agent: 'SDK', llm: 'LLM Usage', tools: 'Tools' };
17201693
var bc = document.getElementById('breadcrumbs');
17211694
if (bc && crumbMap[name]) bc.innerHTML = '<a href="#" onclick="switchView(\'explore\')">mnemonic</a><span class="sep"> › </span>' + crumbMap[name];
1722-
if (name === 'explore' && !state.exploreLoaded.episodes) {
1723-
// Load all forum blocks in parallel
1724-
loadExploreTab('episodes');
1725-
loadExploreTab('memories');
1726-
loadExploreTab('patterns');
1727-
loadExploreTab('abstractions');
1695+
if (name === 'explore') {
17281696
loadForumIndex();
1729-
// Populate welcome panel
17301697
var wp = document.getElementById('forumWelcome');
17311698
if (wp) wp.style.display = '';
17321699
}
1733-
if (name === 'explore' && !state.forumLoaded) loadForumIndex();
17341700
if (name === 'timeline' && !state.timelineInitialized) { populateTimelineProjects(); loadTimelineData(false); }
17351701
if (name === 'agent' && !state.agentLoaded) loadAgentData();
17361702
if (name === 'llm' && !state.llmLoaded) loadLLMUsage();
@@ -1757,6 +1723,12 @@ <h3>Activity</h3>
17571723
if (threadId) loadForumThread(threadId);
17581724
return;
17591725
}
1726+
if (hash.startsWith('memory-section/')) {
1727+
var secId = hash.substring(15);
1728+
var secNames = { episodes: 'Episodes', memories: 'Recent Memories', patterns: 'Discovered Patterns', abstractions: 'Abstractions & Principles' };
1729+
if (secId && secNames[secId]) loadMemorySection(secId, secNames[secId]);
1730+
return;
1731+
}
17601732
if (hash.startsWith('forum-group/')) {
17611733
var groupType = hash.substring(12);
17621734
if (groupType) loadForumGroup(groupType);
@@ -4785,11 +4757,86 @@ <h3>Activity</h3>
47854757
});
47864758

47874759
html += '</ul></div></div>';
4760+
4761+
// Memory System group — links to episode, memory, pattern, abstraction views
4762+
html += '<div class="forabg" style="margin-bottom:2px">';
4763+
html += '<div class="forabg-head"><span class="forabg-title">Memory System</span></div>';
4764+
html += '<div class="inner">';
4765+
html += '<ul class="topiclist"><li class="header"><dl class="row-item">';
4766+
html += '<dt><div class="list-inner">Section</div></dt>';
4767+
html += '<dd class="posts">Count</dd>';
4768+
html += '<dd class="posts"></dd>';
4769+
html += '<dd class="lastpost"></dd>';
4770+
html += '</dl></li></ul>';
4771+
html += '<ul class="topiclist forums">';
4772+
4773+
var memSections = [
4774+
{ id: 'episodes', name: 'Episodes', desc: 'Temporal groupings of observations', icon: 'EP', color: 'var(--accent-violet)', countId: 'epCount' },
4775+
{ id: 'memories', name: 'Recent Memories', desc: 'Encoded knowledge from all sources', icon: 'MM', color: 'var(--accent-cyan)', countId: 'memCount' },
4776+
{ id: 'patterns', name: 'Discovered Patterns', desc: 'Recurring patterns across memories', icon: 'PT', color: 'var(--accent-orange)', countId: 'patCount' },
4777+
{ id: 'abstractions', name: 'Abstractions & Principles', desc: 'Higher-order knowledge and axioms', icon: 'AB', color: 'var(--accent-green)', countId: 'absCount' },
4778+
];
4779+
for (var mi = 0; mi < memSections.length; mi++) {
4780+
var ms = memSections[mi];
4781+
var bgClass = mi % 2 === 0 ? 'bg1' : 'bg2';
4782+
html += '<li class="row ' + bgClass + '" onclick="loadMemorySection(\'' + ms.id + '\', \'' + ms.name + '\')" style="cursor:pointer">';
4783+
html += '<dl class="row-item"><dt>';
4784+
html += '<span class="status-icon" style="width:28px;height:28px;font-size:0.6rem;flex-shrink:0;background:color-mix(in srgb, ' + ms.color + ' 15%, transparent);color:' + ms.color + ';border:1px solid color-mix(in srgb, ' + ms.color + ' 25%, transparent)">' + ms.icon + '</span>';
4785+
html += '<div class="list-inner">';
4786+
html += '<a class="topictitle" style="color:var(--link)">' + ms.name + '</a>';
4787+
html += '<br><span style="font-size:0.75rem;color:var(--text-dim)">' + ms.desc + '</span>';
4788+
html += '</div></dt>';
4789+
html += '<dd class="posts" id="forumIdx_' + ms.countId + '"></dd>';
4790+
html += '<dd class="posts"></dd>';
4791+
html += '<dd class="lastpost"></dd>';
4792+
html += '</dl></li>';
4793+
}
4794+
html += '</ul></div></div>';
4795+
47884796
html += '<div style="padding:6px 16px"><button class="recall-btn" style="font-size:0.78rem;padding:3px 10px" onclick="showNewThreadForm()">+ New Thread</button></div>';
47894797
container.innerHTML = html;
4798+
4799+
// Populate memory section counts from existing explore data
4800+
loadExploreTab('episodes');
4801+
loadExploreTab('memories');
4802+
loadExploreTab('patterns');
4803+
loadExploreTab('abstractions');
47904804
} catch (e) { console.error('Failed to load forum index:', e); }
47914805
}
47924806

4807+
function loadMemorySection(sectionId, sectionName) {
4808+
// Navigate to thread view and render the explore section content there
4809+
state.currentView = 'thread';
4810+
document.querySelectorAll('.view').forEach(function(v) { v.classList.remove('active'); });
4811+
document.querySelectorAll('.ntab').forEach(function(t) { t.classList.remove('active'); });
4812+
var viewEl = document.getElementById('view-thread');
4813+
if (viewEl) viewEl.classList.add('active');
4814+
window.location.hash = 'memory-section/' + sectionId;
4815+
var bc = document.getElementById('breadcrumbs');
4816+
if (bc) bc.innerHTML = '<a href="#" onclick="switchView(\'explore\')">mnemonic</a><span class="sep"> › </span><a href="#" onclick="switchView(\'explore\')">Forum</a><span class="sep"> › </span>Memory System<span class="sep"> › </span>' + escapeHtml(sectionName);
4817+
var compose = document.getElementById('threadCompose');
4818+
if (compose) compose.style.display = 'none';
4819+
4820+
var container = document.getElementById('threadContent');
4821+
if (!container) return;
4822+
4823+
// Copy content from the hidden explore section
4824+
var source = document.getElementById('section-' + sectionId);
4825+
if (source && source.innerHTML && !source.innerHTML.includes('Loading...')) {
4826+
container.innerHTML = '<div class="forabg" style="margin:0"><div class="forabg-head"><span class="forabg-title">' + escapeHtml(sectionName) + '</span></div><div class="inner">' + source.innerHTML + '</div></div>';
4827+
} else {
4828+
container.innerHTML = '<div style="padding:16px;color:var(--text-dim)">Loading ' + escapeHtml(sectionName) + '...</div>';
4829+
// Trigger load and retry after data arrives
4830+
if (!state.exploreLoaded[sectionId]) loadExploreTab(sectionId);
4831+
setTimeout(function() {
4832+
var src = document.getElementById('section-' + sectionId);
4833+
if (src && container) {
4834+
container.innerHTML = '<div class="forabg" style="margin:0"><div class="forabg-head"><span class="forabg-title">' + escapeHtml(sectionName) + '</span></div><div class="inner">' + src.innerHTML + '</div></div>';
4835+
}
4836+
}, 2000);
4837+
}
4838+
}
4839+
47934840
async function loadForumGroup(type) {
47944841
// Show the sub-forums within a category group (General, Agents, Projects, Custom)
47954842
var groupLabels = { system: 'General', project: 'Projects', agent: 'Agents', custom: 'Custom' };

0 commit comments

Comments
 (0)