Commit Graph

36 Commits

Author SHA1 Message Date
Jon
28a4c22ef3 RSS bot: raise initial channel fill cap from 5 to 20
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 22:56:29 +01:00
Jon
332b4a1801 Add show/hide Link + QR toggles for every SimpleX link (default hidden)
Reusable link box (Jinja macro in _macros.html + shared JS/CSS/QR lib in
base.html): a 'Link' button toggles the URL (with copy) and a 'QR' button toggles
a lazily-rendered QR of the same link — both hidden by default. Applied to the
profile address, profile groups & channels, and the profile cards on the list
pages. Centralize robustCopy in base.html; drop the per-page duplicates and the
old async group-link fetch (groups now use their known link).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 22:46:26 +01:00
Jon
3456ed9411 Add 'crypto' bot: streams CoinGecko prices to a channel
New crypto bot type: creates a broadcast channel and posts a price snapshot of the
selected coins/currencies (CoinGecko simple/price JSON) every interval — same
channel-streaming model as RSS. Create form has checkbox grids for popular coins
and currencies plus a poll interval. Generalize the channel helper and feed-poll
state (channel_gid/poll_next) shared by rss + crypto. Adds crypto_test.py (mock
CoinGecko) — passes; rss_test updated for the renamed field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 22:31:44 +01:00
Jon
7cda767408 RSS bot: populate channel on first run so joiners see content
Previously the bot seeded all existing feed items on startup WITHOUT posting, so a
freshly-created channel stayed empty and new subscribers saw nothing (only items
appearing after start were posted). Now on first run it posts the latest items
(max 5) to fill the channel — recent history then shows them to joiners — and sets
an rss_populated flag so restarts don't replay. Existing (empty) bots get filled
once on next start. Update rss_test.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 22:02:15 +01:00
Jon
a43061e096 Fix link/address copy over plain-HTTP LAN; show group link URL inline
navigator.clipboard only works in a secure context, so copy silently failed when
served over a LAN IP on http. Add a robustCopy() with a textarea+execCommand
fallback (used by group-link, address and channel-link copy). The group/channel
'Link' button now toggles a visible, selectable URL row beneath the group with a
working copy button.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 21:48:09 +01:00
Jon
1bd0bd9c7b RSS bot: drop /new command — purely publishing
Remove the /new command, the on-connect latest-items send, the _rss_send_latest
helper and the now-unused rss_items cache. The bot only watches the feed and
broadcasts new posts to its channel. Update welcome + UI copy to drop /new.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 21:33:58 +01:00
Jon
908d16bfc3 Add 'rss' bot: broadcasts an RSS/Atom feed to a channel
New rss bot type: on start it creates a broadcast channel (observer group with
recent history on) and polls a configured feed URL; new posts are broadcast to
the channel. Subscribers join the channel link (seen on the bot's profile);
direct contacts get a welcome + the latest items and can send /new for the
latest. Stdlib-only feed parsing (urllib + ElementTree), seeds existing items on
startup so it doesn't replay the whole feed. Config: feed_url, poll_seconds.
Adds rss_test.py (mock feed) — passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 21:08:05 +01:00
Jon
12d21e6de5 Swap Bots/Business Groups order (tiles + sidebar); move clock below network info
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 20:49:51 +01:00
Jon
9c083dc6d9 Add sidebar clock (24h time + day-of-week date)
Small clock in the sidebar footer: HH:MM (24h) with weekday+date below; collapsed
sidebar shows just the time.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 20:44:55 +01:00
Jon
7f12820eb3 Collapsed sidebar shows only the status dot; rename Businesses → Business Groups
Collapsed sidebar now hides the network text (running/servers/operators) and
keeps just the centered status dot. Rename the user-facing 'Businesses' label to
'Business Groups' (sidebar, homepage tile, list title/heading/empty state, create
button, profile back-link); route/tab id stay 'businesses'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 20:22:41 +01:00
Jon
62489b84b7 Remove sidebar brand diamond; color homepage title with sidebar accent
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 20:14:56 +01:00
Jon
4ed2f9ba14 UI: Font Awesome icons, Material touches, 3-line collapse button
Swap all emoji icons for Font Awesome (sidebar, homepage tiles, profile/chat/
list/settings/relay actions); add Roboto font + card elevation hover for a
Material feel. Replace the bottom 'Collapse' pill with a 3-line (fa-bars) toggle
in the sidebar header; remove the old collapse pill CSS/JS. Copy buttons toggle
FA check/copy via innerHTML. Plain text status (✓/✗) and back arrows kept.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 20:06:59 +01:00
Jon
1881b74d92 Notifications card: show unread count bubble via the shared poll
pollNotifications now updates every .notif-badge (sidebar nav + homepage card)
from the same /api/notifications source, so the card bubble shows the unread
count and clears in lockstep with the sidebar. Add a badge to the card; scope
the collapsed-only badge positioning to the sidebar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 19:40:21 +01:00
Jon
ea5efb06d8 Align sidebar + homepage groups; flatten Relays (drop dropdown); move Notifications to system group
Both the sidebar and the homepage now share the same logical groups:
accounts (Users/Businesses/Bots/File Upload), relays (Chat/File/Message Relay),
system (Network/Notifications/Settings), external (Get App). Relays is now its
own flat divider-separated section in the sidebar instead of a collapsible
dropdown; remove the dropdown CSS/JS. Move Notifications into the system group
on the homepage cards.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 19:15:46 +01:00
Jon
d3a5cb18e4 Sidebar: add Network menu item; drop redundant 'Network' label from status block
Add a Network entry to the sidebar nav (grouped with Notifications/Settings under
one divider). Remove the 'Network ›' title above the bottom status rows — the
running/servers/operators info is self-explanatory; drop its now-unused CSS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 19:07:48 +01:00
Jon
aaf3c23a18 Add 'llm' bot: OpenAI-compatible chat (Ollama-ready)
New 'llm' bot type that takes a startup context (system prompt) and replies to
each message via an OpenAI-compatible endpoint — works with a local Ollama
(ollama serve, http://localhost:11434/v1), OpenAI, Grok, etc. Generalize the
support LLM handler into _handle_llm_message (shared by support + llm) with a
per-bot default prompt. Create form reuses the LLM fields (URL/key/model/context)
for both support and llm. Adds llm_test.py (mock OpenAI backend) — passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:58:54 +01:00
Jon
3f0338041c Home: compact row tiles, centered title, closing bottom bar; File Relay out-arrow icon
Tiles now lay icon + title on one row (more compact); the SimpleX Manager title
is centered over the cards; add a closing faded bar at the bottom. File Relay
icon changed to an out-arrow tray (closest emoji to a folder-with-arrow).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:48:36 +01:00
Jon
37925edcdf Home cards: drop descriptions; give File Relay a distinct icon
Remove the t-desc lines from the homepage tiles (icon + title only). Change File
Relay icon from the folder (same as File Upload) to a card-dividers icon, in both
the homepage card and the sidebar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:44:53 +01:00
Jon
22b5ee7203 Title-case titles: Chat/File/Message Relay and File Upload
Capitalize Relay and Upload in the relay titles and the File Upload entry
(sidebar, homepage cards, relay page title via RELAY_KINDS).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:42:03 +01:00
Jon
5a5134f9b2 Add Relays group (chat/file/message) + faded homepage dividers
New collapsible 'Relays' group in the sidebar (chat/file/message relay) that
expands to show its items and persists open state. Homepage gets a matching
Relays card group, and areas are now split by faded separator bars like the
sidebar. Relay pages are placeholder 'coming soon' stubs (/relays/{kind}).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:38:27 +01:00
Jon
3f9683e07f Homepage: move File upload + Notifications to top area; sidebar: add Get App below Settings
Top area now holds Users/Businesses/Bots/Notifications/File upload; manage area is
Network/Settings; external area is Get SimpleX App. Add a padded Get App link
(nav-sep) below Settings in the sidebar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:30:29 +01:00
Jon
34469455a4 Restore Get SimpleX App link in the footer
It still appears as a homepage card; keep the footer link too (removing it
earlier was not requested).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:25:58 +01:00
Jon
2e298e1438 Group homepage tiles into vertically-buffered areas; add Get SimpleX App card
Split the home tiles into three areas with vertical spacing: accounts
(Users/Businesses/Bots), manage (Network/Notifications/Settings), and external
SimpleX (File upload + a new Get SimpleX App card). Move the Get SimpleX App link
out of the global footer into its own homepage card.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:16:39 +01:00
Jon
964d5e1efa Tidy homepage subtitle out; restyle sidebar collapse button
Remove the homepage tagline. Make the collapse control a proper inset pill with
a 'Collapse' label + chevron (label left, chevron right) instead of a bare
full-width row with a lone arrow; centers to just the icon when collapsed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 18:11:31 +01:00
Jon
270766b99b Add tiled homepage; rename Business→Businesses; link footer copyright
- Home page (home.html) at / shows the sidebar sections as tiles; reachable by
  clicking the 'SimpleX Manager' brand in the sidebar (was redirecting to /users).
- Rename the category to 'Businesses' (route /businesses, tab/nav/_category),
  keeping the per-account bot_type 'business'. Fix profile back-link label.
- Footer: link 'Bournemouth Technology Ltd' -> bournemouthtechnology.co.uk and
  'SimpleX Network' -> simplex.chat.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 17:45:28 +01:00
Jon
2194aa0f82 Fix sidebar clipping on mobile (Logout cut off below the fold)
The sidebar was height:100vh with no overflow, so on mobile the bottom-pinned
footer (network status + Logout) fell below the visible area (browser toolbar)
with no way to reach it. Add overflow-y:auto and use 100dvh on mobile so the
sidebar matches the visible viewport; 100vh kept as fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 17:27:53 +01:00
Jon
609e91c6de Add 'business' profile type and category
Business accounts are cli profiles with businessAddress=True, so each connecting
customer gets their own group chat (handled via the existing chat UI) with an
optional welcome auto-reply. New BUSINESS_TYPES, a /business page + sidebar entry,
and a business variant of the create form. profile/chat pages route via a
_category helper. Adds business_test.py (customer connects -> lands in a business
group, not a direct contact) — passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 17:09:00 +01:00
Jon
6232c1589d Broadcast bot: parity with official simplex-broadcast-bot
Relay publishers' text/links to all contacts via the native /feed command
(reports 'Forwarded to N contact(s), M errors'); reply to non-publishers with
the prohibited message and internally delete their message (CIDMInternal, as
upstream does). Filter content to text/links. Publishers accept 'Name' or
'ID:Name'; welcome/prohibited defaults list the publishers. Add publishers +
prohibited-reply fields to the create form. Adds broadcast_test.py (3 in-process
controllers: bot + publisher + subscriber) — passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 16:27:56 +01:00
Jon
c1bb9cb955 Add chat actions, channels/groups mgmt, directory + deadmans bots, network status
Profiles/bots (profiles.py, main.py):
- Surface real send errors; fix group send and member-count staleness (refresh on view)
- Group/channel actions: join, leave, owner delete; consistent member counts
- Contacts: always-visible Chat, plus Clear chat and Delete contact
- Support bot: OpenAI-compatible LLM backend (Grok/Ollama/OpenAI) per-bot config
- Deadmans bot: check-in window, trigger message, recipients, owner
- Directory bot: add-to-group registration, super-user /approve /reject /list, search,
  publishes listing.json in the website schema (directory.py registry module)
- Profile edit (name/bio/avatar) + avatars on list pages
- Global status + /network page (operators, SMP/XFTP servers) and Settings network info

UI (templates):
- Chat rooms; collapsible left sidebar with notifications + network widget
- Per-directory-bot website generated on creation (name substituted)
- Matrix theme; copy/hyperlink addresses; site footer

Ignore runtime bot state and generated directory sites.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 21:26:16 +01:00
Jon
ecce417f6d Add chat rooms, channels, sidebar nav, themes, and UI polish
Backend (profiles.py / main.py):
- Fix bot startup crash: create active user before start_chat
- Fix address-clobbering bug on restart (UserContactLink vs CreatedConnLink)
- Add user profile type alongside bots
- Channels: create groups with observer links, classify via acceptMemberRole
- Chat rooms: get_chat_history + send_to_chat, history/messages/send routes

UI:
- Chat room view with message bubbles and live polling
- Convert top nav to collapsible left sidebar (mobile-friendly off-canvas)
- Three-way Users/Bots split; clickable cards; copy-address buttons + links
- Add Matrix theme alongside Original Light/Dark
- File upload sidebar link; site footer on all pages incl. login
- Bot-type descriptions on the Bots page; QR caption on profiles

Remove orphaned index.html (superseded by list.html).
Ignore downloaded libs/, exploration DBs, and local ai.sh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 14:48:24 +01:00
Jon
2d9cb4581a Fix start.sh: use python3, drop --reload, cleaner startup output 2026-06-03 01:05:01 +01:00
Jon
c54ba02253 Fix template errors: Starlette new API + remove hx-headers escaping
- TemplateResponse now uses (request, name, context) signature for Starlette 0.36+
- Replace per-button hx-headers with global htmx:configRequest token injection in base.html
- Fix JS cookie regex to handle leading semicolons correctly

Tested: login, auth redirect, profile create/view/delete all return correct status codes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 01:03:19 +01:00
Jon
6afc464d53 Redirect unauthenticated browser requests to /login instead of returning 401 2026-06-03 00:55:48 +01:00
Jon
407a0c15e1 Use python3.12 in start.sh venv creation 2026-06-03 00:53:53 +01:00
Jon
11e799188d Add Python manager: FastAPI backend + web UI
- main.py: FastAPI app with profile CRUD, start/stop, send message endpoints
- profiles.py: asyncio bot lifecycle using simplex-chat Python SDK
- db.py: SQLite registry tracking profiles, types, config, addresses
- templates/: Jinja2 + HTMX web UI
  - login.html: token-based auth
  - index.html: profile list with live status polling, create dialog
  - profile.html: per-bot dashboard with QR code, contacts/groups, event log, send form
- requirements.txt: fastapi, uvicorn, jinja2, simplex-chat
- start.sh: one-command startup with venv bootstrap

Bot types: echo, broadcast, support (business address), directory, deadmans
Run: cd manager && MANAGER_TOKEN=secret ./start.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 00:53:41 +01:00
Jon
5c80ac310f Initial commit: bots, AI-parameterised support bot, web frontend
- simplex-deadmans-bot: Dead Man's Switch Haskell bot
- simplexxx-directory: private SimpleXXX directory bot (fork of simplex-directory-service)
- simplex-support-bot: support triage bot with configurable AI backend
  - --ai-url and --ai-model flags for any OpenAI-compatible provider
  - works with Grok, Ollama, OpenAI, LM Studio, etc.
  - AI_API_KEY env var (GROK_API_KEY still accepted as alias)
- web: SimpleXXX directory frontend (Groups/Channels tabs, matches simplex.chat/directory style)
- manager/: placeholder for Python profile manager (coming soon)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 00:39:08 +01:00