Commit Graph

95 Commits

Author SHA1 Message Date
67c8a6bafb feature: expose /metrics with prometheus client_golang
Some checks failed
Deploy / deploy (push) Has been cancelled
Adds Counter (http_requests_total) and Histogram
(http_request_duration_seconds) labeled by method, chi route pattern,
and status. Wired through a new Metrics middleware (after Recovery so
panics-turned-500s are still counted) and an unauthenticated /metrics
endpoint at the root for Prometheus to scrape.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 20:40:39 +02:00
67f01f4a38 feature: accpet HEAD on /health and /ping for monitoring probes
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-29 15:49:26 +02:00
f47c10ed8a refactor: structured error handling + CreateBox/formatListItem in checkout
Some checks failed
Deploy / deploy (push) Has been cancelled
Replace ErrorMsg string with typed VisibleError struct. Add catch-all
error handler at top of Update() that auto-recovers cart on shop/cart
errors. ESC now dismisses error banners. Refactor shipping address and
payment card checkout lists to use CreateBox + formatListItem for
consistent bordered cards with radio indicators.

Written with Claude Code (claude.ai/code)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-27 20:52:52 +02:00
b35103657d refactor: add formatListItem helper and apply address/card lists
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-27 20:13:25 +02:00
42abf11d04 refactor: extract reusable CreateBox component for bordered card styling
Some checks failed
Deploy / deploy (push) Has been cancelled
replacing duplicated border/selection logic in
  account_orders.go and cart.go. Also fixes a latent SSH rendering bug
  in cart.go where lipgloss.NewStyle() was used instead of theme.Base().
2026-04-27 15:04:00 +02:00
96c9be61ff updating the about section
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-27 10:54:58 +02:00
80166ae8d0 lets try this instead
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-27 10:48:30 +02:00
6bcf651afd fix: my last change was very wrong, i think i made it in my sleep. this should do the trick though
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-27 10:40:41 +02:00
cbb3e59878 update: update the not-selected address items in th address list
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-27 08:15:10 +02:00
00dd63668b fix: fix address not appending to address list in account page after adding it
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-26 13:16:14 +02:00
bd93989036 fix: all keybinds becoming unreactive after completing an order
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-26 12:50:51 +02:00
4083495704 fix: fixed payment not going through if no address and card were saved
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-26 12:21:16 +02:00
7bebdeebed fix: fixed card and address list having duplicate items, and a checkout flow infinate loop condition
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-26 11:59:24 +02:00
e0ff8f5f76 update: update the FAQ section
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-26 11:12:05 +02:00
011bf3a4ff fix: use theme.Base() for order card border so colors render over SSH
Some checks failed
Deploy / deploy (push) Has been cancelled
lipgloss.NewStyle() uses the default renderer which can't output colors
over SSH. Switching to m.theme.Base() uses the session renderer, fixing
BorderForeground. Also reverted to NormalBorder since color now works.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 22:39:36 +02:00
d51912917e fix: use DoubleBorder for selected order card
Some checks failed
Deploy / deploy (push) Has been cancelled
BorderForeground color wasn't rendering differently over SSH. Use
DoubleBorder (╔═╗║╚═╝) for selected vs NormalBorder (┌─┐│└─┘) for
unselected — visually distinct regardless of color support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 22:31:17 +02:00
c8a5f4806d fix: hardcode steel blue border and bold for selected order card
Some checks failed
Deploy / deploy (push) Has been cancelled
Use explicit #4682B4 with bold to ensure the selected border is
visually distinct on all terminal themes including gruvbox.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 22:24:31 +02:00
e2dc2854b7 fix: add 1-item scroll buffer and use highlight color for selected border
Some checks failed
Deploy / deploy (push) Has been cancelled
Scroll triggers when the next item would be off-screen, not when the
current item hits the edge. Selected border now uses highlight color
(steel blue) instead of accent (white) for visibility on all themes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 22:18:43 +02:00
f9885e2d5e fix: use fixed-height order cards and correct viewport height
Some checks failed
Deploy / deploy (push) Has been cancelled
Simplify order list cards to 2 content lines (matching reference) so
itemHeight is always 4. Remove extra margin/buffer from viewport height
calc since account is a viewport page with no margins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 22:11:49 +02:00
34bb7a7c7f fix: correct scroll height estimates and improve order selection visibility
Some checks failed
Deploy / deploy (push) Has been cancelled
The scroll-to-item calculations used wrong item heights (7/5 instead of
9/7) and ignored the 5-line title header offset, causing the viewport to
under-scroll. Selected order cards now light up in accent color for
better visibility across terminal themes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 22:00:44 +02:00
79c8238f1b fix: scrolling stopped working in last commit. this change is made by claude so it just might break again
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-25 21:48:33 +02:00
5c38c7e726 update scroll handling
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-25 11:41:20 +02:00
4024cf4b40 fix: fixed the border on order history currently selected item not showing up for some terminal themes
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-25 11:01:45 +02:00
c78f5eb12b refactor: remove putting ssh key in memory at all, just use it for auth
Some checks failed
Deploy / deploy (push) Has been cancelled
changed the ssh key to just do fingerprinting and not store it at all, and not be able to edit it either in the account page
2026-04-25 10:50:19 +02:00
c8af9cb551 change: change the proceed warning to red to make it easier to catch
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-24 17:02:05 +02:00
d7b172843e resolve splash screen deadlock and auth 500 soft-deleted ssh keys
Some checks failed
Deploy / deploy (push) Has been cancelled
Auth handler used FirstOrCreate which couldn't see soft-deleted keys
  (GORM filters by deleted_at IS NULL) but also couldn't insert (unique
  index still covers deleted rows), returning 500 on every login after
  a key deletion. Use Unscoped lookup and restore soft-deleted keys.

  Splash screen also got permanently stuck when auth failed because
  splashViewInitCmd was never fired, leaving splash.dataReady false.
2026-04-24 16:51:19 +02:00
d66b41eed3 refactor: refactor the footer handling
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-24 12:13:26 +02:00
6db7748d9f change the BuildAccountView inline sub-views to use 4 different files to make it better
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-24 11:37:42 +02:00
abe11853f6 refactor: add helper functions for subtotal, cart empty, and cart item count
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-24 10:29:15 +02:00
280585c2d0 sdfsdf
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-24 10:17:46 +02:00
8a86965981 update .gitignore
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-24 10:07:03 +02:00
edc032d6d4 bug fixes: various small bug fixes and typos
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-24 10:04:31 +02:00
53c1b5e254 update: removed stale errors
Some checks failed
Deploy / deploy (push) Has been cancelled
when encountering an error, the error would never be removed, i just reset the error msg in the switchPage function, this will have to be redone later to make error messages dissapear after a while even on the same page
2026-04-24 09:45:32 +02:00
1bc03822b1 security: remove SSH public key from TUI memory
Some checks failed
Deploy / deploy (push) Has been cancelled
replace SSHPublicKeyStr field on Model with a closure-based authCmd that
fires, the public key lives only in the goroutine stack not on the
long-lived Model struct

Prevents key material exposure in heap dumps if the process crashed
2026-04-24 09:39:26 +02:00
6006f9617d refactor: add dedicated *Switch() methods
Some checks failed
Deploy / deploy (push) Has been cancelled
added dedicated *Switch() methods (ShopSwitch, CartSwitc, AccountSwitch, ...) for page transitions and remove the catch-all resetPageState(). Each switch owns its pages zero-init, viewport setup, and async data fetching
2026-04-24 09:25:31 +02:00
1c3ebf789c refactor: update the flat model struct with nested structs
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-24 08:57:04 +02:00
bef7f85bda rewrite: update the slice sort to use built-in lib sort
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-19 14:15:14 +02:00
fb5881f26f docs: make README actually sound human
Some checks failed
Deploy / deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 11:40:36 +02:00
7a774ceee7 docs: rewrite README as a project intro
Some checks failed
Deploy / deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 11:39:17 +02:00
a624037f65 docs: update README with live URL and hosting info
Some checks failed
Deploy / deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 11:35:29 +02:00
d111dafd62 chore: untrack terminal-shop-source reference repo
Some checks failed
Deploy / deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 11:33:12 +02:00
cb048bc3dc chore: untrack binaries and update README
Some checks failed
Deploy / deploy (push) Has been cancelled
Remove compiled binaries (main, terminalShop, api/main, api/api-server)
and server.go.old from git tracking. Add them to .gitignore. Update
README to reflect current project state accurately.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 11:32:21 +02:00
22ab7438e1 yay
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-17 11:28:52 +02:00
4403138f74 just some updates to gitignore
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-17 11:26:39 +02:00
2d86e1d23f chore: bump version to trigger CI
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-16 18:00:38 +02:00
b92132474b various error checks and formatting
Some checks failed
Deploy / deploy (push) Has been cancelled
2026-04-14 15:26:36 +02:00
8157789e66 update: some updates to the deploy action 2026-04-13 14:48:20 +02:00
7a8f7e9c2a update: add some config to the deploy action 2026-04-13 14:39:12 +02:00
44a9de0209 ci: add github actions deploy 2026-04-13 14:29:51 +02:00
7882667e35 update: commented out unused country codes 2026-04-13 14:08:47 +02:00