rename: kafka → samsa
Full project rename from kafka to samsa (after Gregor Samsa, who woke one morning from uneasy dreams to find himself transformed). - Module: github.com/metamorphosis-dev/kafka → samsa - Binary: cmd/kafka/ → cmd/samsa/ - CSS: kafka.css → samsa.css - UI: all 'kafka' product names, titles, localStorage keys → samsa - localStorage keys: kafka-theme → samsa-theme, kafka-engines → samsa-engines - OpenSearch: ShortName, LongName, description, URLs updated - AGPL headers: 'kafka' → 'samsa' - Docs, configs, examples updated - Cache key prefix: kafka: → samsa:
This commit is contained in:
parent
c91908a427
commit
8e9aae062b
70 changed files with 185 additions and 184 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** Redesign the kafka frontend to match Brave Search's layout: three-column results page, category tiles on homepage, and a hybrid preferences system with full-page `/preferences` route.
|
||||
**Goal:** Redesign the samsa frontend to match Brave Search's layout: three-column results page, category tiles on homepage, and a hybrid preferences system with full-page `/preferences` route.
|
||||
|
||||
**Architecture:** CSS Grid for page-level layouts (three-column results, two-column preferences). JavaScript popover for quick settings (theme + engines only). Server-rendered full preferences page with localStorage persistence. Category tiles are static links with category query params.
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
| File | Responsibility |
|
||||
|------|----------------|
|
||||
| `internal/views/static/css/kafka.css` | Add layout grids, category tiles, sidebar styles, mobile breakpoints |
|
||||
| `internal/views/static/css/samsa.css` | Add layout grids, category tiles, sidebar styles, mobile breakpoints |
|
||||
| `internal/views/templates/index.html` | Add category tiles below search box |
|
||||
| `internal/views/templates/results.html` | Add left sidebar, restructure for three-column grid |
|
||||
| `internal/views/templates/preferences.html` | **New** — full preferences page with nav |
|
||||
|
|
@ -30,11 +30,11 @@
|
|||
### Task 1: Add CSS Grid Layouts and Breakpoints
|
||||
|
||||
**Files:**
|
||||
- Modify: `internal/views/static/css/kafka.css`
|
||||
- Modify: `internal/views/static/css/samsa.css`
|
||||
|
||||
- [ ] **Step 1: Add three-column results layout CSS**
|
||||
|
||||
Append to end of `kafka.css`, before the `@media print` block:
|
||||
Append to end of `samsa.css`, before the `@media print` block:
|
||||
|
||||
```css
|
||||
/* ============================================================
|
||||
|
|
@ -364,7 +364,7 @@ Note: CSS is embedded as static files and not processed by the Go compiler. CSS
|
|||
- [ ] **Step 7: Commit**
|
||||
|
||||
```bash
|
||||
git add internal/views/static/css/kafka.css
|
||||
git add internal/views/static/css/samsa.css
|
||||
git commit -m "feat(frontend): add CSS layout framework for three-column results and preferences page"
|
||||
```
|
||||
|
||||
|
|
@ -895,7 +895,7 @@ git commit -m "feat(frontend): add category tiles to homepage"
|
|||
|
||||
- [ ] **Step 2: Add preferences section CSS styles**
|
||||
|
||||
Append to `kafka.css`:
|
||||
Append to `samsa.css`:
|
||||
|
||||
```css
|
||||
/* ============================================================
|
||||
|
|
@ -1010,7 +1010,7 @@ func RenderPreferences(w http.ResponseWriter, sourceURL string) error {
|
|||
- [ ] **Step 4: Commit**
|
||||
|
||||
```bash
|
||||
git add internal/views/templates/preferences.html internal/views/static/css/kafka.css internal/views/views.go
|
||||
git add internal/views/templates/preferences.html internal/views/static/css/samsa.css internal/views/views.go
|
||||
git commit -m "feat(frontend): add preferences page template and styles"
|
||||
```
|
||||
|
||||
|
|
@ -1020,7 +1020,7 @@ git commit -m "feat(frontend): add preferences page template and styles"
|
|||
|
||||
**Files:**
|
||||
- Modify: `internal/httpapi/handlers.go`
|
||||
- Modify: `cmd/kafka/main.go`
|
||||
- Modify: `cmd/samsa/main.go`
|
||||
|
||||
- [ ] **Step 1: Add GET and POST handlers for /preferences**
|
||||
|
||||
|
|
@ -1053,7 +1053,7 @@ func (h *Handler) PreferencesPOST(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
- [ ] **Step 2: Register the route in main**
|
||||
|
||||
Find where routes are registered (likely in `cmd/kafka/main.go`) and add:
|
||||
Find where routes are registered (likely in `cmd/samsa/main.go`) and add:
|
||||
|
||||
```go
|
||||
mux.HandleFunc("GET /preferences", handler.Preferences)
|
||||
|
|
@ -1068,7 +1068,7 @@ Expected: No errors
|
|||
- [ ] **Step 4: Commit**
|
||||
|
||||
```bash
|
||||
git add internal/httpapi/handlers.go cmd/kafka/main.go
|
||||
git add internal/httpapi/handlers.go cmd/samsa/main.go
|
||||
git commit -m "feat: add GET and POST /preferences route"
|
||||
```
|
||||
|
||||
|
|
@ -1192,7 +1192,7 @@ git commit -m "fix(frontend): add HTMX filter submission"
|
|||
### Task 8: Final Mobile Responsiveness Audit
|
||||
|
||||
**Files:**
|
||||
- Review: `internal/views/static/css/kafka.css`
|
||||
- Review: `internal/views/static/css/samsa.css`
|
||||
|
||||
- [ ] **Step 1: Test all breakpoints manually**
|
||||
|
||||
|
|
@ -1201,7 +1201,7 @@ git commit -m "fix(frontend): add HTMX filter submission"
|
|||
- [ ] **Step 3: Commit any fixes**
|
||||
|
||||
```bash
|
||||
git add internal/views/static/css/kafka.css
|
||||
git add internal/views/static/css/samsa.css
|
||||
git commit -m "fix(frontend): improve mobile responsiveness"
|
||||
```
|
||||
|
||||
|
|
@ -1211,7 +1211,7 @@ git commit -m "fix(frontend): improve mobile responsiveness"
|
|||
|
||||
| Phase | Task | Files |
|
||||
|-------|------|-------|
|
||||
| 1 | CSS Layout Framework | `kafka.css` |
|
||||
| 1 | CSS Layout Framework | `samsa.css` |
|
||||
| 2 | Results Three-Column | `results.html`, `views.go` |
|
||||
| 3 | Homepage Tiles | `index.html` |
|
||||
| 4 | Preferences Page | `preferences.html` (new), `handlers.go`, `settings.js` |
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
**Goal:** A preferences popover panel (top-right on desktop, bottom sheet on mobile) that lets users set theme, enabled engines, safe search, and default format. All changes auto-save to `localStorage` and apply immediately to the DOM.
|
||||
|
||||
**Architecture:** Pure client-side JS + CSS added alongside existing templates. No Go changes. Settings persist via `localStorage` key `kafka_prefs`. Theme applies via `data-theme` attribute on `<html>`.
|
||||
**Architecture:** Pure client-side JS + CSS added alongside existing templates. No Go changes. Settings persist via `localStorage` key `samsa_prefs`. Theme applies via `data-theme` attribute on `<html>`.
|
||||
|
||||
**Tech Stack:** Vanilla JS (no framework), existing `kafka.css` custom properties, HTMX for search.
|
||||
**Tech Stack:** Vanilla JS (no framework), existing `samsa.css` custom properties, HTMX for search.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
| Action | File |
|
||||
|--------|------|
|
||||
| Create | `internal/views/static/js/settings.js` |
|
||||
| Modify | `internal/views/static/css/kafka.css` |
|
||||
| Modify | `internal/views/static/css/samsa.css` |
|
||||
| Modify | `internal/views/templates/base.html` |
|
||||
| Modify | `internal/views/templates/index.html` |
|
||||
| Modify | `internal/views/templates/results.html` |
|
||||
|
|
@ -28,11 +28,11 @@
|
|||
## Task 1: CSS — Popover, toggles, bottom sheet
|
||||
|
||||
**Files:**
|
||||
- Modify: `internal/views/static/css/kafka.css`
|
||||
- Modify: `internal/views/static/css/samsa.css`
|
||||
|
||||
- [ ] **Step 1: Add CSS for popover, triggers, toggles, bottom sheet**
|
||||
|
||||
Append the following to `kafka.css`:
|
||||
Append the following to `samsa.css`:
|
||||
|
||||
```css
|
||||
/* ============================================
|
||||
|
|
@ -305,7 +305,7 @@ Expected: all pass
|
|||
- [ ] **Step 3: Commit**
|
||||
|
||||
```bash
|
||||
git add internal/views/static/css/kafka.css
|
||||
git add internal/views/static/css/samsa.css
|
||||
git commit -m "feat(settings): add popover, toggle, and bottom-sheet CSS"
|
||||
```
|
||||
|
||||
|
|
@ -335,7 +335,7 @@ var DEFAULT_PREFS = {
|
|||
format: 'html'
|
||||
};
|
||||
|
||||
var STORAGE_KEY = 'kafka_prefs';
|
||||
var STORAGE_KEY = 'samsa_prefs';
|
||||
|
||||
// ── Persistence ──────────────────────────────────────────────────────────────
|
||||
|
||||
|
|
@ -619,7 +619,7 @@ In `base.html`, update the `<body>` to:
|
|||
<body class="{{if .Query}}search_on_results{{end}}">
|
||||
{{if .ShowHeader}}
|
||||
<header class="site-header">
|
||||
<span class="site-title">kafka</span>
|
||||
<span class="site-title">samsa</span>
|
||||
<!-- Desktop trigger (hidden on mobile) -->
|
||||
<button id="settings-trigger" class="settings-trigger settings-trigger-desktop"
|
||||
aria-label="Preferences" aria-expanded="false" aria-controls="settings-popover">⚙</button>
|
||||
|
|
@ -633,7 +633,7 @@ In `base.html`, update the `<body>` to:
|
|||
{{template "content" .}}
|
||||
</main>
|
||||
<footer>
|
||||
<p>Powered by <a href="https://git.ashisgreat.xyz/penal-colony/kafka">kafka</a> — a privacy-respecting, open metasearch engine</p>
|
||||
<p>Powered by <a href="https://git.ashisgreat.xyz/penal-colony/samsa">samsa</a> — a privacy-respecting, open metasearch engine</p>
|
||||
</footer>
|
||||
<script src="/static/js/settings.js"></script>
|
||||
<div id="settings-popover" data-open="false" role="dialog" aria-label="Preferences" aria-modal="true">
|
||||
|
|
@ -699,7 +699,7 @@ The `value` is populated by `syncEngineInput(prefs)` on page load. When the form
|
|||
|
||||
- [ ] **Step 2: Verify existing search works**
|
||||
|
||||
Run: `go run ./cmd/kafka -config config.toml`
|
||||
Run: `go run ./cmd/samsa -config config.toml`
|
||||
Open: `http://localhost:8080`
|
||||
Search for "golang" — results should appear as normal.
|
||||
|
||||
|
|
@ -716,7 +716,7 @@ git commit -m "feat(settings): add hidden engines input to search forms"
|
|||
|
||||
- [ ] **Step 1: Start server**
|
||||
|
||||
Run: `go run ./cmd/kafka -config config.toml`
|
||||
Run: `go run ./cmd/samsa -config config.toml`
|
||||
Open: `http://localhost:8080`
|
||||
|
||||
- [ ] **Step 2: Verify gear icon and panel**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Overview
|
||||
|
||||
Redesign the kafka frontend to match Brave Search's clean, functional aesthetic with emphasis on layout changes: three-column results page, category tiles on homepage, and a hybrid preferences system with full-page `/preferences` route.
|
||||
Redesign the samsa frontend to match Brave Search's clean, functional aesthetic with emphasis on layout changes: three-column results page, category tiles on homepage, and a hybrid preferences system with full-page `/preferences` route.
|
||||
|
||||
## Design Principles
|
||||
|
||||
|
|
@ -302,7 +302,7 @@ On mobile (< 768px):
|
|||
| `internal/views/templates/results.html` | Add left sidebar, restructure for three columns |
|
||||
| `internal/views/templates/base.html` | Minimal changes (no structural changes needed) |
|
||||
| `internal/views/templates/preferences.html` | **New** — full preferences page |
|
||||
| `internal/views/static/css/kafka.css` | Add layout grids, category tiles, sidebar styles, sticky positioning, mobile breakpoints |
|
||||
| `internal/views/static/css/samsa.css` | Add layout grids, category tiles, sidebar styles, sticky positioning, mobile breakpoints |
|
||||
| `internal/views/static/js/settings.js` | Reduce popover to theme + engines; add preferences page JS |
|
||||
| `internal/httpapi/httpapi.go` | Add `/preferences` route (GET + POST) |
|
||||
| `internal/views/views.go` | Add preferences template rendering |
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Settings UI Design — kafka
|
||||
# Settings UI Design — samsa
|
||||
|
||||
**Date:** 2026-03-22
|
||||
**Status:** Approved
|
||||
|
|
@ -61,10 +61,10 @@ const DEFAULT_PREFS = {
|
|||
|
||||
```js
|
||||
// Written on every interaction
|
||||
localStorage.setItem('kafka_prefs', JSON.stringify({ ... }));
|
||||
localStorage.setItem('samsa_prefs', JSON.stringify({ ... }));
|
||||
|
||||
// Read on page load — merge with DEFAULT_PREFS
|
||||
const saved = JSON.parse(localStorage.getItem('kafka_prefs') || '{}');
|
||||
const saved = JSON.parse(localStorage.getItem('samsa_prefs') || '{}');
|
||||
const prefs = { ...DEFAULT_PREFS, ...saved };
|
||||
```
|
||||
|
||||
|
|
@ -76,5 +76,5 @@ const prefs = { ...DEFAULT_PREFS, ...saved };
|
|||
## Applied to Existing Code
|
||||
|
||||
- `base.html` — add gear button in header, panel markup at end of `<body>`
|
||||
- `kafka.css` — popover styles, toggle switch styles, bottom sheet styles for mobile
|
||||
- `samsa.css` — popover styles, toggle switch styles, bottom sheet styles for mobile
|
||||
- `settings.js` — localStorage read/write, theme application, panel toggle, aria attributes, focus trap
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue