fix(chrome): "Your sheets" said twice, and neither one was right
The top bar read "Sheets ... Your sheets" with both pointing at the same page: handleIndex 303s a signed-in visitor from / to /sheets, so the brand in the top-left already IS the way back to the list. A menu of one destination offered under two names. The nav link goes, and the empty <nav> landmark goes with it rather than being left behind as a labelled box with nothing in it. The page heading was the second copy of the same phrase, and it was also untrue. The line directly beneath it says everyone on the instance can open every sheet here, which means almost none of them are yours. A heading its own subtitle contradicts is worse than no heading, so it is "All sheets" — accurate, and no longer an echo of the wordmark sitting an inch above it. The <title> follows it. Nothing in the CSS depended on the nav being there. Worth checking rather than assuming, because the auto margin that puts Create against the account menu lives on [data-topbar-actions] and was measured into place twice: it takes the bar's free space itself, so removing an item from the same flex line only gives it more to take. Confirmed in a browser, not reasoned about — the list renders Import and Create hard against the account, and the grid page, which contributes no actions element at all, keeps rastrillo's own margin on the account because the sibling selector that removes it no longer matches anything. handlers_list_chrome_test.go used "Your sheets</h1>" as its marker for "this is the list page" when proving an import refusal does NOT render there. The marker moves with the heading; the assertion is unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6duGuSDdBALsa9mwyrTZt
4 files changed,
+18
−6
internal/sheets/handlers_list_chrome_test.go+1 −1internal/sheets/handlers_sheets.go+1 −1internal/sheets/templates/layout.html+10 −3internal/sheets/templates/sheets.html+6 −1
diff --git a/internal/sheets/handlers_list_chrome_test.go b/internal/sheets/handlers_list_chrome_test.go| index 8282dee..5369f48 100644 |
| --- a/internal/sheets/handlers_list_chrome_test.go |
| +++ b/internal/sheets/handlers_list_chrome_test.go |
| @@ -210,7 +210,7 @@ func TestRefusalRendersOnTheImportPage(t *testing.T) { |
| if !strings.Contains(body, `action="/sheets/import"`) { |
| t.Error("the refusal rendered somewhere without the form to retry from") |
| } |
| - if strings.Contains(body, "Your sheets</h1>") { |
| + if strings.Contains(body, "All sheets</h1>") { |
| t.Error("the refusal rendered on the sheet list") |
| } |
| } |
diff --git a/internal/sheets/handlers_sheets.go b/internal/sheets/handlers_sheets.go| index c4f6b3c..2c79762 100644 |
| --- a/internal/sheets/handlers_sheets.go |
| +++ b/internal/sheets/handlers_sheets.go |
| @@ -104,7 +104,7 @@ func (a *App) renderSheetList(w http.ResponseWriter, r *http.Request, status int |
| for _, s := range list { |
| rows = append(rows, sheetRow{SheetSummary: s, Preview: a.previewFor(s)}) |
| } |
| - a.render(w, r, "sheets", "Your sheets — Oficina Sheets", status, |
| + a.render(w, r, "sheets", "All sheets — Oficina Sheets", status, |
| sheetListView{Sheets: rows}) |
| } |
diff --git a/internal/sheets/templates/layout.html b/internal/sheets/templates/layout.html| index 77ed0ee..9ab26a8 100644 |
| --- a/internal/sheets/templates/layout.html |
| +++ b/internal/sheets/templates/layout.html |
| @@ -75,9 +75,16 @@ |
| </details> |
| {{end}} |
| <div rst-shell-tail> |
| -<nav rst-shell-nav> |
| -{{if .SignedIn}}<a href="/sheets">Your sheets</a>{{end}} |
| -</nav> |
| +{{/* There is no nav here, and the empty landmark went with the link. |
| + |
| + It held one item, "Your sheets", pointing at /sheets — which is |
| + where the brand two elements to the left already goes: handleIndex |
| + 303s a signed-in visitor from / to /sheets. So the bar read |
| + "Sheets ... Your sheets" and both were the same destination under |
| + two names, which is a menu of one choice offered twice. |
| + |
| + The brand is the way back to the list. That is what a wordmark in |
| + the top-left is for, and it is one fewer thing to read. */}} |
| {{/* A page's own top-bar actions, beside the account menu. |
| Deliberately a block rather than a field on PageData, and |
diff --git a/internal/sheets/templates/sheets.html b/internal/sheets/templates/sheets.html| index 78534f1..8269e9e 100644 |
| --- a/internal/sheets/templates/sheets.html |
| +++ b/internal/sheets/templates/sheets.html |
| @@ -51,7 +51,12 @@ |
| {{define "content"}} |
| <header rst-page-header> |
| <div rst-page-header-titles> |
| -<h1>Your sheets</h1> |
| +{{/* "All sheets", not "Your sheets". The old heading was wrong twice: |
| + it repeated the brand in the bar directly above it, and it claimed |
| + ownership the line underneath immediately contradicts — everyone on |
| + the instance opens every sheet here, so almost none of these are |
| + yours. A heading its own subtitle corrects is worse than none. */}} |
| +<h1>All sheets</h1> |
| <p rst-page-header-sub>Everyone on this instance can open every sheet here.</p> |
| </div> |
| </header> |