blob: 61a80225760535b1c92c4358fa5ca687e5039b9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# Bug 001: Template Error in Notes Tab
**Status:** Resolved
**Severity:** High (Runtime Panic/Error)
**Component:** Frontend/Handlers
## Description
The `notes-tab` template attempts to render the `error-banner` partial, which expects an `.Errors` field in the data context. However, the `HandleNotes` handler was passing an anonymous struct containing only `Notes`, causing a template execution error.
## Root Cause
Mismatch between template expectation (`{{.Errors}}`) and handler data structure (`struct { Notes []models.Note }`).
## Fix
Updated `HandleNotes` in `internal/handlers/tabs.go` to include `Errors []string` in the data struct passed to the template.
## Verification
A reproduction test case `internal/handlers/template_test.go` was created to verify that the `notes-tab` template can be successfully executed with the updated data structure.
|