From 8114fda4d20d4ae0f5be0aad18a8a95f1bf9e9ae Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 10:11:36 +0000
Subject: [PATCH 1/3] Initial plan
From 234e129ca6564a341d2ecdb8b051d463219f9c52 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 10:19:03 +0000
Subject: [PATCH 2/3] Remove sidebar flickering by always showing all nav links
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---
app/app.go | 11 +++++------
app/html/mu.js | 48 ++----------------------------------------------
2 files changed, 7 insertions(+), 52 deletions(-)
diff --git a/app/app.go b/app/app.go
index d3823575..71c1f737 100644
--- a/app/app.go
+++ b/app/app.go
@@ -215,20 +215,19 @@ var Template = `
Home
Blog
Chat
-
Mail
+
Mail
News
Video
Markets
Places
Weather
Reminder
-
Wallet
+
Wallet
diff --git a/app/html/mu.js b/app/html/mu.js
index 47b9013d..8268d17f 100644
--- a/app/html/mu.js
+++ b/app/html/mu.js
@@ -575,27 +575,13 @@ function setSession() {
});
})
.then(sess => {
- console.log('Success:', sess);
- // Nav elements (sidebar)
- var navMail = document.getElementById("nav-mail");
- var navWallet = document.getElementById("nav-wallet");
- var navAccount = document.getElementById("nav-account");
- var navLogout = document.getElementById("nav-logout");
- var navLogin = document.getElementById("nav-login");
var navMailBadge = document.getElementById("nav-mail-badge");
var navUsername = document.getElementById("nav-username");
-
+
if (sess.type == "account") {
isAuthenticated = true;
- // Show authenticated nav items
- if (navMail) navMail.style.display = 'flex';
- if (navWallet) navWallet.style.display = 'flex';
- if (navAccount) navAccount.style.display = 'flex';
- if (navLogout) navLogout.style.display = 'flex';
- if (navLogin) navLogin.style.display = 'none';
if (navUsername && sess.account) {
navUsername.textContent = 'Signed in as @' + sess.account;
- navUsername.style.display = 'block';
}
// Fetch unread mail count for badge
fetch('/mail?unread=count')
@@ -612,19 +598,7 @@ function setSession() {
}
} else {
isAuthenticated = false;
- // Hide authenticated nav items, show login
- if (navMail) navMail.style.display = 'none';
- if (navWallet) navWallet.style.display = 'none';
- if (navAccount) navAccount.style.display = 'none';
- if (navLogout) navLogout.style.display = 'none';
- if (navLogin) {
- navLogin.style.display = 'flex';
- // Update login link to include redirect parameter
- if (window.location.pathname !== '/login' && window.location.pathname !== '/signup' && window.location.pathname !== '/') {
- const redirectUrl = encodeURIComponent(window.location.pathname + window.location.search);
- navLogin.href = '/login?redirect=' + redirectUrl;
- }
- }
+ if (navUsername) navUsername.textContent = '';
}
updateChatFormState();
updateSearchFormsState();
@@ -632,24 +606,6 @@ function setSession() {
.catch(error => {
console.error('Error:', error);
isAuthenticated = false;
- var navMail = document.getElementById("nav-mail");
- var navWallet = document.getElementById("nav-wallet");
- var navAccount = document.getElementById("nav-account");
- var navLogout = document.getElementById("nav-logout");
- var navLogin = document.getElementById("nav-login");
- if (navMail) navMail.style.display = 'none';
- if (navWallet) navWallet.style.display = 'none';
- if (navAccount) navAccount.style.display = 'none';
- if (navLogout) navLogout.style.display = 'none';
- if (navLogin) {
- navLogin.style.display = 'flex';
- // Update login link to include redirect parameter
- if (window.location.pathname !== '/login' && window.location.pathname !== '/signup' && window.location.pathname !== '/') {
- const redirectUrl = encodeURIComponent(window.location.pathname + window.location.search);
- navLogin.href = '/login?redirect=' + redirectUrl;
- }
- }
-
updateChatFormState();
updateSearchFormsState();
});
From b7f3b5a75e57c0d583365ae0e2c9049fb8e3df75 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 26 Feb 2026 13:45:47 +0000
Subject: [PATCH 3/3] Server-side render Login vs Account/Logout in nav-bottom
based on session
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---
app/app.go | 29 ++++++++++++++++++-----------
mail/mail.go | 6 +++---
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/app/app.go b/app/app.go
index 71c1f737..503a6576 100644
--- a/app/app.go
+++ b/app/app.go
@@ -224,11 +224,7 @@ var Template = `
Reminder
Wallet
-