Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: remove the unused Forward Template editor from Messages settings (#9970)
[._.]/ Adam Eivy9435033a2199
diff --git a/client/src/components/messages/ConfigTab.jsx b/client/src/components/messages/ConfigTab.jsxindex 608c2fbea7..94731b44d2 100644--- a/client/src/components/messages/ConfigTab.jsx+++ b/client/src/components/messages/ConfigTab.jsx@@ -26,19 +26,6 @@ Additional instructions: {{instructions}}Write a professional, concise reply. Match the tone of the original message.`;-const DEFAULT_FORWARD_TEMPLATE = `You are a professional email assistant. Draft a forwarding message for the following email.--Original From: {{from}}-Subject: {{subject}}-Body:-{{body}}--{{#instructions}}-Additional instructions: {{instructions}}-{{/instructions}}--Write a brief forwarding note to introduce the email to the recipient.`;-export default function ConfigTab({ accounts, setAccounts }) {const [showForm, setShowForm] = useState(false);const [form, setForm] = useState({ name: '', type: 'gmail', email: '' });@@ -83,7 +70,8 @@ export default function ConfigTab({ accounts, setAccounts }) {const replyConfig = msgConfig.reply || {};setConfig({replyTemplate: msgConfig.replyTemplate || DEFAULT_REPLY_TEMPLATE,- forwardTemplate: msgConfig.forwardTemplate || DEFAULT_FORWARD_TEMPLATE,+ // Unsupported legacy setting: no runtime consumer, preserved opaquely so saves do not discard it+ ...(Object.hasOwn(msgConfig, "forwardTemplate") ? { legacyForwardTemplate: msgConfig.forwardTemplate } : {}),voiceMode: msgConfig.voiceMode ?? false});// Restore saved provider/model - per-action configs with legacy fallback@@ -190,7 +178,7 @@ export default function ConfigTab({ accounts, setAccounts }) {model: replySelectedModel},replyTemplate: config.replyTemplate,- forwardTemplate: config.forwardTemplate,+ ...(Object.hasOwn(config, "legacyForwardTemplate") ? { forwardTemplate: config.legacyForwardTemplate } : {}),voiceMode: config.voiceMode}};@@ -666,18 +654,6 @@ export default function ConfigTab({ accounts, setAccounts }) {className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-sm text-white font-mono placeholder-gray-500 focus:outline-none focus:border-port-accent resize-y"/></FormField>- <FormField- label="Forward Template"- className="p-4 bg-port-card rounded-lg border border-port-border"- labelClassName="block text-sm font-medium text-gray-300 mb-2"- >- <textarea- value={config.forwardTemplate}- onChange={(e) => updateTemplate('forwardTemplate', e.target.value)}- rows={6}- className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-sm text-white font-mono placeholder-gray-500 focus:outline-none focus:border-port-accent resize-y"- />- </FormField><div className="flex items-center gap-3"><buttononClick={handleSaveConfig}diff --git a/client/src/components/messages/ConfigTab.test.jsx b/client/src/components/messages/ConfigTab.test.jsxindex 14a8589271..265f98ac05 100644--- a/client/src/components/messages/ConfigTab.test.jsx+++ b/client/src/components/messages/ConfigTab.test.jsx@@ -131,3 +131,31 @@ describe('Messages account deletion', () => {expect(setAccounts.mock.calls[0][0]([gmailAccount])).toEqual([]);});});++describe('Messages prompt template settings', () => {+ const noAuth = { hasCredentials: true, hasTokens: true, needsScopeUpgrade: false };++ async function editReplyAndSave() {+ api.getGoogleAuthStatus.mockResolvedValue(noAuth);+ api.updateSettings = vi.fn().mockResolvedValue({ ok: true });+ renderConfig();+ const reply = await screen.findByLabelText('Reply Template');+ fireEvent.change(reply, { target: { value: 'Custom reply' } });+ fireEvent.click(screen.getByRole('button', { name: /Save Config/ }));+ await waitFor(() => expect(api.updateSettings).toHaveBeenCalled());+ return api.updateSettings.mock.calls[0][0].messages;+ }++ it('offers no Forward Template editor and writes no default for it', async () => {+ const messages = await editReplyAndSave();+ expect(screen.queryByLabelText('Forward Template')).not.toBeInTheDocument();+ expect(messages.replyTemplate).toBe('Custom reply');+ expect(Object.hasOwn(messages, 'forwardTemplate')).toBe(false);+ });++ it('round-trips an existing stored forwardTemplate unchanged', async () => {+ api.getSettings.mockResolvedValue({ messages: { forwardTemplate: '' } });+ const messages = await editReplyAndSave();+ expect(messages.forwardTemplate).toBe('');+ });+});