Commit Graph

1067 Commits

Author SHA1 Message Date
6ff7d5da3e docs(16-03): todo for Journal HTML content re-save 2026-10-09 18:45:59 +02:00
719830410e docs(state): record phase 18 context session 2026-10-09 18:45:15 +02:00
65d577b828 docs(todos): capture plugin-registered cabana field types 2026-10-09 18:45:14 +02:00
6ea3652303 docs(18): capture phase context 2026-10-09 18:45:14 +02:00
e381f2cc0f docs(16-02): record plan 16-02 progress and decisions in STATE and ROADMAP v0.1.15 2026-10-09 18:30:15 +02:00
070da81907 docs(16-02): complete vue-grzybyfunkcjonalne-app plan 2026-10-09 18:29:54 +02:00
ee5ab31492 docs(16-01): record plan 16-01 progress and decisions in STATE and ROADMAP 2026-10-09 18:10:01 +02:00
b53892c316 docs(16-01): complete vue-journal-layer plan
- SUMMARY with the D-20/D-21 prerequisite contract
- USER-SETUP: both Gitea repos exist; the site repo is private (SSH)
2026-10-09 18:09:36 +02:00
7c5b8a8cb7 docs(quick-261009-mys): subtitle, avatar and My account page for backend users 2026-10-09 18:01:43 +02:00
89611eaaf9 test(cabana): cover My account profile, password and avatar
- account_internal_test: metadata subtitle reader and writer (NULL, blank,
  null, [], invalid JSON, non-objects, key preservation, NULL on the last
  key), the attachOne contract, avatar cap, unique-violation mapping,
  English fallbacks, and 401 for non-backend principals on all three routes
- account_test (Postgres): profile payload incl. copied WinterCMS metadata
  and avatar rows, trimmed profile saves and metadata keys, the forbidden-key
  allow-list with unchanged rows, email rules, password rules, the failed
  attempt log, Bearer and cookie session effects, CSRF, avatar upload,
  refusals (SVG, HTML as PNG, size, part shape, 413, no bucket) with no row
  or blob left, replace and remove with blob cleanup
- lagoon: TestBackendAdminMetadataColumn covers type, Winter row round trip,
  rollback of only the column and re-migrate
- SPA: AccountView, the user menu account item and avatar image,
  setCurrentUser and profileInitials; lang fixture gains myaccount keys
2026-10-09 17:59:27 +02:00
4f1cda33d7 fix(cabana): answer an empty or malformed avatar upload body with 422
- POST /account/avatar with no multipart part (NextPart io.EOF) or a broken
  boundary fell through to the generic 500; it is now the invalid-body 422
- a body over the cap still answers 413 payload_too_large
2026-10-09 17:53:21 +02:00
a03302e8fe docs(state): record phase 17 context session 2026-10-09 17:53:07 +02:00
02936b15bc docs(17): capture phase context 2026-10-09 17:53:00 +02:00
64d21c8caf feat(cabana): add backend user avatars to My account and the top bar
- cabana.BackendUser is an attach.Owner (MorphName Backend\Models\User,
  cabana.BackendUserMorphType) with one public attachOne avatar
  (cabana.BackendUserAvatarField), as WinterCMS stores it
- POST /account/avatar stores one file_data image (jpg, jpeg, png, gif or
  webp, image guard, at most cabana.AvatarMaxBytes = 2 MiB, under a
  server-generated name) and replaces the previous avatar: old rows are
  deleted in the transaction, their blobs after the commit
- DELETE /account/avatar removes the avatar and is idempotent
- GET /auth/me and the account routes return avatar {url, thumb_url}
  (250x250 crop); cabana.BackendUserAvatar lets plugins read it
- swag annotations, regenerated admin.json and schema.d.ts; route
  inventories, CSRF walk (29) and OpenAPI conformance learn both routes
- SPA: avatar upload and remove on My account, avatar image in the user
  menu trigger and header; backend::lang.myaccount avatar strings
- rebuilt boardwalk dist; cabana README, users-and-permissions and
  admin-spa docs
2026-10-09 17:45:43 +02:00
143eca5a1f feat(cabana): add the My account page with subtitle and password change
- lagoon: 202610090001_backend_users_metadata adds WinterCMS's nullable
  jsonable backend_users.metadata column (TEXT); rollback drops only it
- cabana.BackendUser.Metadata and Subtitle read metadata.subtitle leniently
  (NULL, blank, null, [], invalid JSON and non-strings read as empty)
- GET /auth/me returns subtitle; PUT /account edits the signed-in admin's
  own names, email and subtitle, and the password with current_password;
  any other key is a 422 and nothing is written
- email: required, valid, 6-255 chars, unique against other admins' email
  and login ignoring case (soft-deleted included); a unique-index race is 422
- a password change sets tokens_valid_after, revokes the presented token and
  gives a cookie session a fresh cookie
- swag annotation, regenerated admin.json and schema.d.ts; route inventories,
  CSRF walk (27) and OpenAPI conformance learn the route
- SPA: My account item in the user menu opens /account (AccountView), which
  saves through PUT /account and updates the top bar via setCurrentUser
- backend::lang.myaccount strings (en, pl), rebuilt boardwalk dist
- cabana and lagoon READMEs, users-and-permissions and admin-spa docs
2026-10-09 17:38:04 +02:00
5ba1a4ae1d docs(quick-261009-mgk): add the category content field to sm-journal-plugin (D-21) 2026-10-09 16:29:19 +02:00
56f3d9c59f docs(quick-261009-i6e): add the anonymous author endpoint to sm-journal-plugin (D-20) 2026-10-09 13:23:28 +02:00
f9324470bf docs(16): create phase plan 2026-10-09 12:25:09 +02:00
edf11f967c docs(16): resolve research open questions 2026-10-09 12:25:09 +02:00
6d36ffaef0 docs(16): add pattern map 2026-10-09 11:44:39 +02:00
960de8f1df docs(16): record post-research decisions D-19..D-25 2026-10-09 11:42:22 +02:00
460da612f1 docs(phase-16): add validation strategy 2026-10-09 11:16:49 +02:00
4117a6fce3 docs(16): research phase 2026-10-09 11:16:49 +02:00
78b1d91568 g15office config 2026-10-09 10:35:16 +02:00
Jakub Zych
03553a9172 docs(quick-261008-o6k): summercms.io/update updates one application in place v0.1.14 2026-10-08 23:39:44 +02:00
Jakub Zych
9b3803c098 feat(sunrise): update an application in place with summercms.io/update
- new.sh gains --update, run inside one application directory (go.mod and
  summer.yaml required); it changes only that application
- the framework checkout is read from the app's go.mod replace (single-line
  or block form); module-version replaces, missing targets and foreign or
  dirty checkouts are refused through the shared check_framework_dir
- a detached checkout moves fast-forward only to the newest release (or
  SUMMERCMS_REF) through the shared move_detached; a branch checkout is
  pulled with git pull --no-rebase --ff-only, refusing a missing upstream
  or a diverged branch with the checkout unchanged
- other sm-*-app directories on the same checkout are named on one
  "not rebuilt" line and never built or written
- summer is reinstalled, a missing SUMMER_ADMIN__JWT__SECRET is appended to
  this app's .env (openssl, else head and base64; mode kept, never printed),
  then summer build runs and the script ends with the migrate and restart
  reminder and the shared path_hint
- sunrise.UpdateScript() serves the same script with its last line changed
  to main "$@" --update, so truncated downloads still run nothing
- check-phase14.3.sh --forbidden now allows only the literal
  SUMMER_ADMIN__JWT__SECRET in new.sh and still fails on any other
  SUMMER_ name or on a read or export of one; TestUpdateScript and
  TestUpdateScriptRoute are required tests
2026-10-08 20:15:50 +02:00
Jakub Zych
27f75308d7 docs(quick-261008-kdh): serve prints URL and admin status; summer new apps admin-ready 2026-10-08 17:24:33 +02:00
Jakub Zych
f70d80ec7e feat(build): make summer new apps admin-ready
- NewOptions.AdminSecret: summer new writes SUMMER_ADMIN__JWT__SECRET
  to .env (still 0600), generated from 32 crypto/rand bytes when empty
  and validated as at least 32 .env-safe characters
- .env.example gets an empty SUMMER_ADMIN__JWT__SECRET= placeholder
  with a comment; the secret never reaches the printed next steps
- The next steps and the generated CLAUDE.md explain the admin at
  /backend: make:admin-controller, build, migrate and
  summer admin:create --email you@example.com --superuser
- Goldens use a fixed, non-secret admin secret fixture
- Scaffolding, installation and users-and-permissions docs updated
2026-10-08 17:20:19 +02:00
Jakub Zych
da21670870 feat(surf): print the serve URL and admin status on startup
- Add surf.Router.AdminPrefix (additive): the admin mount path and true
  when BuildRouter mounted the cabana admin, false otherwise
- serve binds with net.Listen before printing, so a busy port fails
  without a misleading URL, then prints the listen address with a
  browser URL and an admin status line: the admin URL, a warning naming
  summer admin:create when backend_users is empty or missing, or
  admin: off with the steps to add an admin controller
- The administrator count is bounded by a 2 s timeout and never fails boot
- route:list ends with the same admin status line
- surf and cabana READMEs and the console and routing docs describe the output
2026-10-08 16:36:21 +02:00
Jakub Zych
4b5ed7707e docs(quick-261008-kdf): summer delegates pass flags through and forward signals 2026-10-08 16:24:54 +02:00
Jakub Zych
50c8cee541 fix(summer): forward SIGINT and SIGTERM to the app binary
- runAppBinary registers SIGINT and SIGTERM after its build and recursion
  checks and runChild forwards each signal to the app binary, then waits
  for it to exit, so stopping summer serve frees the port (WR-08)
- newAppCmd keeps the inherited stdin, env and output, and a context
  cancel sends SIGTERM with a 15-second appShutdownGrace before SIGKILL
- the child stays in summer's process group so the admin password
  prompts can read the terminal
- helper-process tests cover SIGINT, SIGTERM and context cancel
- console introduction notes the signal forwarding
2026-10-08 16:12:01 +02:00
Jakub Zych
b9ef034272 fix(summer): delegate admin, route and key commands and pass all delegate flags through
- delegateCommands() builds every delegate from one table of name,
  description and common-flags hint; toolCommands appends it
- route:list, key:generate, admin:create and admin:reset-password are new
  delegates; the child keeps summer's stdin, so the password prompts work
- migrate:rollback, queue:work and schedule:run lose their hand-written
  flag copies: --plugin, --queue and --once now pass through verbatim
- the command list marks delegates with "(flags pass to the app binary)"
  and the help command prints a Long text with the common flags
- console introduction, setup-and-maintenance and the root README
  describe the passthrough behaviour and the new delegates
2026-10-08 16:03:24 +02:00
Jakub Zych
9eb2a9237c fix(summer): pass delegated command flags to the app binary
- delegateCommand builds a Passthrough bonfire command, so
  `summer serve --addr :8123`, `summer serve --help` and `-h` reach the
  app binary instead of failing with "unknown flag: --addr"
- one leading "--" is dropped so `summer serve -- --addr :8123` still
  works
- appRunner is a package-level seam that tests replace to capture argv
2026-10-08 15:50:03 +02:00
Jakub Zych
14f6982c4d feat(bonfire): add Passthrough and Long command fields
- Command.Passthrough turns off cobra flag parsing and uses arbitrary
  args, so every argument after the command name, including --help, -h
  and --, reaches Run through Input.Args unchanged
- Command.Long sets cobra's Long text for the help command; without it
  the description is shown as before
- both fields are additive: commands without Passthrough parse flags and
  reject unknown ones exactly as before
- README and docs/console/writing-commands.md describe both fields
2026-10-08 15:49:39 +02:00
Jakub Zych
a6e2c399a5 docs(quick-261008-k7s): Bootstrap script PATH hint per login shell 2026-10-08 15:36:01 +02:00
Jakub Zych
ddf1178c51 feat(sunrise): print the PATH hint for the user's login shell
- new.sh reads the basename of SHELL (via ${SHELL:-} under set -u) and
  prints fish_add_path "<dir>" for fish, which keeps it for new sessions,
  export PATH="<dir>:$PATH" naming ~/.zshrc or ~/.bashrc for zsh and
  bash, and today's generic export line with "your shell profile" for
  any other, empty or unset shell
- dq_escape escapes the install directory for the target shell's double
  quotes: backslash, double quote and dollar always, plus backtick and a
  single-quoted ! for POSIX shells; a per-character loop, so bash 3.2
  and 5.2 behave the same
- the behaviour harness defaults SHELL to empty so cases do not depend on
  the developer's login shell, adds an unset-SHELL mode and covers fish,
  zsh, bash, empty, unset, unknown and two metacharacter directories
- TestBootstrapEndToEnd pins SHELL=/bin/bash
- sunrise README and docs/setup/installation.md describe the per-shell
  hint; the manual PATH section gains fish_add_path (go env GOPATH)/bin
2026-10-08 15:34:42 +02:00
Jakub Zych
8973da5cc1 test(14.3): record the v0.1.13 release and production acceptance in UAT 2026-10-08 14:10:43 +02:00
Jakub Zych
b1f54976aa test(14.3): persist human verification items as UAT v0.1.13 2026-10-08 12:50:07 +02:00
Jakub Zych
3caaf5f894 docs(14.3): add code review report 2026-10-08 12:42:58 +02:00
Jakub Zych
16a8520bb5 docs(14.3-04): update state and roadmap after the unit tests and gate plan 2026-10-08 12:32:18 +02:00
Jakub Zych
9dac7b8f67 docs(14.3-04): complete unit tests and phase gate plan 2026-10-08 12:31:45 +02:00
Jakub Zych
c4c91f0f6b chore(14.3-04): keep the gate marker line unique in check-phase14.3.sh 2026-10-08 12:30:11 +02:00
Jakub Zych
d0af79b496 docs(14.3-04): sign off the phase 14.3 security review and validation map
- security review: T-14.3-20..26 added, every row pinned by a named test or gate stage
- validation: per-plan map with exact tests and commands, validated and nyquist_compliant
2026-10-08 12:30:03 +02:00
Jakub Zych
89f1ab2c44 chore(14.3-04): fail-closed phase 14.3 gate with --unit, --security and --all
- --unit: vet, full suite with named --- PASS lines for every required test,
  goldens unchanged, examples/hello, docs check, site plugin/app, landing page
- --forbidden: no SUMMER_ name in new.sh, no new go.mod require since v0.1.12,
  no plugin/yaegi dependency, relative golden paths, goldens not ignored
- --bootstrap and --terminal run the gated end-to-end checks
- --security parses the threat register; --all runs every stage in its own process
2026-10-08 12:25:24 +02:00
Jakub Zych
93e9a8a45c test(14.3-04): pin the bootstrap script's behaviour matrix and shellcheck
- TestScriptBehavior: 25 cases on a stub PATH (real git, stub go/docker/summer)
  against a bare fake framework remote: usage and name errors, existing app,
  Go missing/old/devel, git required, Docker warning, newest release tag,
  SUMMERCMS_REF, fast-forward re-runs, refusals with HEAD unchanged,
  summer called from the parent with stdin closed, cd line and PATH hint
- TestScriptShellcheck: shellcheck -s bash new.sh, skipped only without shellcheck
2026-10-08 12:25:24 +02:00
Jakub Zych
392dd3c83f test(14.3-04): cover every summer new branch, key and CLI path
- name rule, existing targets, framework resolution order, inside-checkout refusal
- cleanup on failure, key validation, .env 0600, AGENTS.md symlink
- first commit identity, configured identity, missing git, --no-git, --no-plugin build
- plugin:add relative go.work, plain make:plugin routes, GenerateAppKey, summer new via the CLI
2026-10-08 12:18:14 +02:00
Jakub Zych
eed24b8ad1 test(14.3-04): pin every file summer new writes with golden files
- new_golden_test.go: -update flag, fixed 0x00..0x1f key, sibling summercms symlink
- testdata/new (16 files + next steps) and testdata/new-no-plugin (6)
- plugin go.mod replace and absent root go.sum asserted instead of pinned
2026-10-08 12:12:34 +02:00
Jakub Zych
9f56dc7eff docs(14.3-03): update state and roadmap after the docs and landing page plan 2026-10-08 12:10:20 +02:00
Jakub Zych
e2c8852b4c docs(14.3-03): complete docs and landing page plan 2026-10-08 12:09:59 +02:00
Jakub Zych
e0640220f2 docs(14.3-03): document summer new and the one-command start
- installation: one-liner first, what the script does and its overrides,
  running the generated app, summer new without the script, then the
  examples/hello walkthrough; the obsolete known-issues callout is gone (D-18)
- go modules and workspaces: what summer new writes (relative replace,
  framework detection order, committed relative go.work, no root go.sum);
  plugin:add adds a relative go.work path
- console scaffolding: Creating an application with --framework, --no-plugin,
  --no-git, the files written, first commit and naming convention (D-01)
- console introduction, llms note in site.yaml, root README quick start
2026-10-08 12:08:35 +02:00