Inventory is now the Market

Everything the user sees says Market: the sidebar, titles, breadcrumbs,
help text, messages, suggestions and the agent tool's description; the
export downloads as supermarket-market.yaml. Its pages live under
/market, and the old /inventory addresses redirect there (308, so a
form's POST stays a POST). The YAML format (inventory:), the database
and the code's names are unchanged, so exported files still import. A
breadcrumb no longer repeats the page's own title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 12:38:50 -07:00
co-authored by Claude Opus 5.5
parent 98f8788f18
commit a81ced3503
25 changed files with 105 additions and 79 deletions
+6 -6
View File
@@ -25,7 +25,7 @@ func (s *Server) inventoryList(w http.ResponseWriter, r *http.Request) {
s.serverError(w, err)
return
}
s.render(w, r, "inventory", page{Title: "Inventory", Nav: "inventory", Data: map[string]any{
s.render(w, r, "inventory", page{Title: "Market", Nav: "inventory", Data: map[string]any{
"Entries": entries,
"Relationship": rel,
"Relationships": inventory.Relationships,
@@ -94,7 +94,7 @@ func (s *Server) inventorySave(w http.ResponseWriter, r *http.Request) {
s.render(w, r, "entry", page{Title: title, Nav: "inventory", Error: err.Error(), Data: s.entryForm(e)})
return
}
redirect(w, r, "/inventory", "saved")
redirect(w, r, "/market", "saved")
}
func entryFromForm(r *http.Request) *inventory.Entry {
@@ -197,11 +197,11 @@ func (s *Server) inventoryDelete(w http.ResponseWriter, r *http.Request) {
s.serverError(w, err)
return
}
redirect(w, r, "/inventory", "deleted")
redirect(w, r, "/market", "deleted")
}
func (s *Server) inventoryImportPage(w http.ResponseWriter, r *http.Request) {
s.render(w, r, "import", page{Title: "Import inventory", Nav: "inventory", Data: map[string]any{
s.render(w, r, "import", page{Title: "Import into the Market", Nav: "inventory", Data: map[string]any{
"Relationships": inventory.Relationships,
}})
}
@@ -217,7 +217,7 @@ func (s *Server) inventoryImport(w http.ResponseWriter, r *http.Request) {
rel := r.FormValue("relationship")
overwrite := r.FormValue("overwrite") == "on"
show := func(errMsg string, res *inventory.ImportResult) {
s.render(w, r, "import", page{Title: "Import inventory", Nav: "inventory", Error: errMsg, Data: map[string]any{
s.render(w, r, "import", page{Title: "Import into the Market", Nav: "inventory", Error: errMsg, Data: map[string]any{
"Relationships": inventory.Relationships,
"Result": res,
"YAML": r.FormValue("yaml"),
@@ -269,7 +269,7 @@ func (s *Server) inventoryExport(w http.ResponseWriter, r *http.Request) {
return
}
w.Header().Set("Content-Type", "application/yaml")
w.Header().Set("Content-Disposition", `attachment; filename="supermarket-inventory.yaml"`)
w.Header().Set("Content-Disposition", `attachment; filename="supermarket-market.yaml"`)
w.Write(data)
}