Commit graph

92 commits

Author SHA1 Message Date
Derick Phan
44a16dea98
Add pytest test suite
Some checks failed
/ build (push) Failing after 5s
174 tests covering URL normalization, FTS5 query sanitization, SSRF/CSRF
guards, sharing-mode logic, DB schema and upsert paths, handler
end-to-end flows, and gateway body-size / mesh-whitelist guards. Each
recent bug-fix commit (6ffd38d, 1bc695f, 8dffd8c) has an explicit
regression test in test_regressions.py. One xfail documents a minor
latent bug in clean_url where port 80 is not stripped from upgraded
https URLs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 15:03:29 -07:00
Derick Phan
8dffd8ccea
Add data-loss guards and first-run empty state
- Bulk delete now routes through a server-rendered confirmation page
  listing the selected titles; a `confirmed=1` form field is required
  before pages are actually deleted. Mirrors the single-delete flow.
- Reset-template button gains a JS confirm() so stray clicks don't wipe
  the custom template.
- Homepage shows a short, neutral empty-state block when the index has
  zero pages and no query — just names what tinyweb is and links to
  /add, /style, and /subscriptions as equal options.
- /about gains a "your data" section explaining what lives in
  ~/.tinyweb/ (identity file, index.db), what losing each costs, and
  how /export differs from a full backup.
- README gains a "Backups" subsection mirroring the /about copy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 09:38:07 -07:00
Derick Phan
1bc695f508
Harden network and privacy defaults; fix several bugs
Security:
- Bind HTTP gateway to 127.0.0.1 by default; add --bind for LAN opt-in
- Restrict Reticulum mesh surface to GET /api/sites only (CSRF cannot
  authenticate mesh callers, so gate by whitelist)
- Cap request body size at 16 MiB to prevent memory DoS
- Redact /bookmark query strings from request logs so the bookmark token
  and URLs do not land in stdout / docker / journal logs
- Tighten FTS5 sanitizer: strip colon, drop AND/OR/NOT/NEAR operator words
- Expand .dockerignore; document trust model in README

Features:
- Add sharing mode toggle (share everything except private vs share only
  public-tagged) with /share/preview so users can see what subscribers
  would receive before enabling sharing

Bugs:
- handle_export() crashed on every call (missing query kwarg)
- Dead float16 decompression branch in embeddings.py silently corrupted
  the HNSW index when compress_embeddings was on
- GATEWAY_PORT staleness: --port and find_available_port had no effect
  on the actual bind
- semantic_search default mismatched between db.py ("1") and the rest of
  the app ("0"), causing embeddings to be generated when the UI said off
- Connection pool returned connections with uncommitted transactions to
  the next consumer
- Gateway POST body decode 502'd on non-UTF-8 input
- ensure_rns_config clobbered user-edited ~/.reticulum/config; now only
  rewrites files it authored (sentinel-tagged)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 15:37:45 -07:00
Derick Phan
ce50150363
Add LoRa support with background sync and settings UI
- Progressive retry in rns_client.py: fast timeout (15s) then slow (60s+)
  for LoRa/multi-hop links, with automatic fallback
- Background sync threads so subscriptions page returns immediately
  with syncing/error status indicators per subscription
- LoRa RNode configuration in settings page with serial port and
  expandable advanced radio settings (frequency, bandwidth, etc.)
- Internet transport now toggleable alongside LoRa — users can
  enable one, the other, or both
- Reticulum config auto-generated from settings on startup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:47:09 -07:00
lichenblankie
6ffd38d58c Fixed edge case domains 2026-04-18 22:52:24 +00:00
lichenblankie
254cf562c3 Add private tag clarification
All checks were successful
/ build (push) Successful in 2m16s
2026-04-12 02:39:02 +00:00
lichenblankie
f50bac65ad Add public/private sites
All checks were successful
/ build (push) Successful in 2m18s
2026-04-12 02:31:34 +00:00
lichenblankie
533cf96dce Updated default
All checks were successful
/ build (push) Successful in 2m18s
2026-04-11 22:13:01 +00:00
lichenblankie
8ecb963be4 Optimized storage and updated readme
All checks were successful
/ build (push) Successful in 2m19s
2026-04-11 21:59:55 +00:00
lichenblankie
552311b730 Add Docker setup instructions 2026-04-11 07:20:52 +00:00
lichenblankie
26b5d899ae Fixed workflow build
All checks were successful
/ build (push) Successful in 3m23s
2026-04-11 07:12:26 +00:00
lichenblankie
0b9227648b Fixed workflow build
Some checks failed
/ build (push) Failing after 2m15s
2026-04-11 07:08:41 +00:00
lichenblankie
68d706c2d6 Fixed workflow build
Some checks failed
/ build (push) Failing after 2m11s
2026-04-11 07:04:31 +00:00
lichenblankie
bb51ed1e39 Fixed workflow build
Some checks failed
/ build (push) Failing after 1m59s
2026-04-11 07:00:32 +00:00
lichenblankie
7078e2aa13 Fixed workflow build
Some checks failed
/ build (push) Failing after 2m16s
2026-04-11 05:57:40 +00:00
lichenblankie
5473680998 Fixed workflow build
Some checks failed
/ build (push) Failing after 5s
2026-04-11 05:55:47 +00:00
lichenblankie
a32840c309 Fixed workflow build
All checks were successful
/ build (push) Successful in 1m58s
2026-04-11 05:11:06 +00:00
lichenblankie
6ad3ac8743 Fixed workflow build
All checks were successful
/ build (push) Successful in 2m3s
2026-04-11 05:07:24 +00:00
lichenblankie
cb1175a5d1 Fixed workflow build
Some checks failed
/ build (push) Failing after 2m5s
2026-04-11 05:02:14 +00:00
lichenblankie
d454c0994c Fixed workflow build
Some checks failed
/ build (push) Failing after 1m57s
2026-04-11 04:45:50 +00:00
lichenblankie
6347dce86c Fixed workflow build
All checks were successful
/ build (push) Successful in 1m56s
2026-04-11 04:39:40 +00:00
lichenblankie
b4c358238d Fixed workflow build
All checks were successful
/ build (push) Successful in 1m54s
2026-04-11 04:33:53 +00:00
lichenblankie
c8b9364f32 Fixed workflow build
Some checks failed
/ build (push) Failing after 1m54s
2026-04-11 04:29:04 +00:00
lichenblankie
ac088cc291 Fixed workflow build
Some checks failed
/ build (push) Failing after 2m7s
2026-04-11 04:23:48 +00:00
lichenblankie
27edc9f279 Fixed workflow build
All checks were successful
/ build (push) Successful in 1m55s
2026-04-11 04:15:02 +00:00
lichenblankie
d5061eade9 Fixed workflow build
Some checks failed
/ build (push) Failing after 1m57s
2026-04-11 04:09:17 +00:00
lichenblankie
d1114233d2 Fixed workflow build
Some checks failed
/ build (push) Failing after 1m55s
2026-04-11 03:57:45 +00:00
lichenblankie
24f89c46f6 Fixed workflow build
Some checks failed
/ build (push) Successful in 2m16s
/ release (push) Failing after 5s
2026-04-11 03:52:03 +00:00
lichenblankie
976300461f Fixed workflow build
Some checks failed
/ build (push) Failing after 2m50s
/ release (push) Has been skipped
2026-04-11 03:42:21 +00:00
lichenblankie
c045c8709c Fixed workflow build
Some checks are pending
/ build (push) Waiting to run
/ release (push) Blocked by required conditions
2026-04-11 03:40:09 +00:00
Derick Phan
d39f9a7813
Add bulk operations, select all, and orphaned tag cleanup
Some checks are pending
/ build (push) Waiting to run
/ release (push) Blocked by required conditions
- Bulk delete and retag from browse page with checkboxes
- Select all / deselect all toggle
- Delete confirmation shows count of selected pages
- Auto-cleanup orphaned tags on delete, edit, and bulk actions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 10:33:57 -07:00
Derick Phan
b86e139bdd
Privacy hardening: degoogle, security headers, referrer protection
- Replace Google Fonts with system font stacks across all themes
- Add Referrer-Policy, X-Content-Type-Options, X-Frame-Options, CSP headers
- Add rel="noreferrer noopener" on all outbound links
- Add no-referrer and dns-prefetch-control meta tags to all themes
- Clean tracking params on outbound links from trusted/remote sources
- Remove Google domains from CSP whitelists

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 10:11:57 -07:00
Derick Phan
23b634d0e0
Fix kodama2 custom cursor disappearing on scroll
Set min-height: 100vh on html/body so the cursor-bearing elements
fill the viewport even when content is short.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 09:08:19 -07:00
Derick Phan
aff8c654cc
Add kodama2 theme with styles for new handler features
Adds pagination, meta, and success message styles, plus input
selectors for new form fields (edit page, manual entry, transport node).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 09:05:12 -07:00
lichenblankie
c844e2c81e Disabled semantic search and reranker by default
Some checks are pending
/ build (push) Waiting to run
/ release (push) Blocked by required conditions
2026-04-08 05:21:08 +00:00
Test User
57a79e5e8e Add PyInstaller builds, AGPLv3 license, transport node selection, and rmap.world link
- Add pyinstaller.spec and GitHub/Forgejo CI workflows for cross-platform builds
- Add AGPLv3 license
- Move data storage to ~/.tinyweb/
- Add --version and --port CLI flags
- Add transport node selection in /style (smart regeneration preserves Reticulum config)
- Add discover more nodes link to rmap.world
2026-04-08 04:36:28 +00:00
696a32cef9 Update add form 2026-03-30 23:14:54 +00:00
Test User
f2f4682fa1 Hide toggle for now 2026-03-30 23:13:00 +00:00
Test User
387714a221 Move extra line break after note for spacing before tags 2026-03-30 23:06:45 +00:00
Test User
da95e580f4 Add extra line break between note and tags for better spacing 2026-03-30 23:06:12 +00:00
Test User
3bebb5734b Remove CSS, use consistent br spacing in add form 2026-03-30 23:04:52 +00:00
Test User
756493e286 Fix toggle gap using CSS margin for consistent spacing 2026-03-30 23:03:57 +00:00
Test User
fb4d4dbaec Fix inconsistent spacing in add form when toggling input type 2026-03-30 23:03:00 +00:00
Test User
ea8f256882 Fix gap in add form between URL and note fields 2026-03-30 23:01:23 +00:00
Test User
395e38d2ab Merge branch 'test-reticulum-hash' of https://git.derickphan.com/lichenblankie/tinyweb into test-reticulum-hash 2026-03-30 22:55:56 +00:00
Test User
7795662154 Add radio toggle for URL vs Reticulum hash input in add page 2026-03-30 22:54:29 +00:00
67fc2f7649 Merge branch 'test-reticulum-hash' of https://git.derickphan.com/lichenblankie/tinyweb into test-reticulum-hash 2026-03-30 22:50:02 +00:00
d6616f69d5 Update handler 2026-03-30 22:49:57 +00:00
Test User
a3429409eb Add dropdown to switch between add site and subscribe in same input box 2026-03-30 22:48:45 +00:00
Test User
80a1d44dee Add reticulum destination hash option to add URL page 2026-03-30 22:36:58 +00:00