Commit graph

229 commits

Author SHA1 Message Date
b6739fff70 Fix thread search suggestions: navigate on click, fix duplicate ID
- Add explicit click handler on suggestions so clicking navigates
  to the existing thread instead of interacting with the form
- Fix duplicate id="thread_title_input" in forms.j2 edit macro
  (renamed to edit_title_input to avoid conflict with create form)
2026-02-02 08:13:05 -05:00
c038b649b2 Fix thread search: strip stop words, use OR matching for keywords
"Do you have an API?" now correctly matches "API testing journey"
by stripping stop words (do, you, have, an) and punctuation, then
matching remaining keywords with OR logic across titles and content.
2026-02-02 08:02:02 -05:00
165aff32e2 Improve thread search to keyword matching across titles and content
Search now splits query into keywords and matches each against both
title and data fields (not just title prefix). Also searches child
node content and returns parent threads for matches.
2026-02-01 21:52:31 -05:00
c93647e2b7 Resolve @mentions in markdown preview endpoint
Pass dbsession to markdown_to_html so @username mentions are
converted to profile links during live preview, not just on save.
2026-02-01 21:44:43 -05:00
8260897aeb Add node moderation API endpoints and enforce production rules
- PATCH /api/v1/nodes/{id} now accepts disabled, approved, locked fields
- DELETE /api/v1/nodes/{id} for permanent deletion (moderator only)
- Python client: disable_node, enable_node, approve_node, lock_node,
  unlock_node, delete_node methods plus CLI commands
- CLAUDE.md: production rules forbidding direct SQL, mandate API client
- Fix modify_node.py Python 2 remnants (unicode, raw_input)
2026-02-01 21:23:37 -05:00
c530e0f9dc Fix empty active nodes page: namespace filter now includes root nodes
Root nodes have root_id=NULL, so the IN subquery missed them entirely.
Added OR clause to also match nodes by namespace_id directly.
2026-02-01 21:06:05 -05:00
44e9fe94d2 Add missing Alembic migration for user push columns and webmention table
The previous commit added notification_preference and push_subscriptions
columns to rb_user and a new rb_webmention table without migrations,
causing 502 on production.
2026-02-01 20:46:55 -05:00
f1cffe2e79 Resolve all 14 tracked tickets (T0-T13)
High priority fixes:
- T0: Profile page now filters comments by namespace (was leaking cross-site)
- T1: URI hostnames and namespace names normalized to lowercase (was causing
  duplicate threads and "stock comments" bug). Includes merge script.
- T2: Thread detail API now paginated with SQL-side filtering (was 502 on
  267+ reply threads)

Features:
- T3: GDPR account deletion (tombstone user with scrubbed PII) and data export
- T4: Customizable button text and comment labels per namespace
- T5: Self-service namespace deletion for owners
- T6: @mention notifications with profile links
- T7: Webmention receiving endpoint with h-card extraction
- T8: Configurable max nesting depth and collapse depth per namespace
- T9: AJAX thread title search to prevent duplicates
- T10: Browser push notification support (VAPID/service worker)

Docs and housekeeping:
- T11: Documented thread_uri behavior when moving embeds
- T12/T13: Drafted community replies for resolved feature requests
- Collapse depth defaults to infinite (load-more disabled unless configured)

364 tests pass, 4 skipped.
2026-02-01 20:02:47 -05:00
c5823c62ac Update functional test to preserve journey thread narrative
Instead of overwriting the thread body with raw test data,
the test now only updates the "Latest: X/Y passed" line.
The narrative content stays as written.
2026-02-01 17:39:13 -05:00
0ea91d6859 Fix commit-hash.txt placement: copy into env before creating tarball 2026-02-01 17:17:00 -05:00
4f60f6fbed Fix version endpoint to read commit-hash.txt from CI build
The deploy environment has no .git directory. Now reads
commit-hash.txt (written by CI) from the virtualenv, repo
root, or /opt/remarkbox before falling back to git rev-parse.
CI build step now copies commit-hash.txt into the virtualenv.
2026-02-01 16:57:19 -05:00
f0e365fd43 Add GET /api/v1/version endpoint for deploy verification
Returns the git commit hash of the running code. CLAUDE.md
updated to check this endpoint after pushing to confirm
deployment is live.
2026-02-01 16:44:42 -05:00
5a10e155bd Add Python client, profile endpoint, and functional test
- remarkbox_client.py: stdlib-only Python client with cookie
  persistence, 3-tier config (args/env/file), CLI mode
- GET/PATCH /api/v1/user/profile: read and update display name
- GET /api/v1/clients/python: serve client for curl/wget download
- functional_test.py: idempotent live test that maintains a
  journey thread documenting each run
- Remove email2 spam honeypot from API (not useful for agents)
- Bump content limit to 500k chars (~128k tokens)
2026-02-01 16:39:19 -05:00
9d59a3ca8a Add JSON API for agent access (/api/v1/)
REST API with endpoints for threads, replies, nodes, and email OTP
authentication. Includes in-memory sliding-window rate limiting,
global api.enabled INI kill-switch, per-namespace api_access opt-out
with settings UI checkbox, and 500k character content limit (~128k
tokens) for long-form agent content. Ships enabled by default.
2026-02-01 14:49:01 -05:00
8666e97721 Only show Comments header in site mode, not embed mode 2026-01-29 09:40:00 -05:00
b39e5dd55d Add Comments section header to distinguish from main content 2026-01-29 09:38:15 -05:00
3ac6cbee50 Add margin-top to reply form for spacing from content 2026-01-29 09:36:26 -05:00
4d8d77c9b8 Add postmortem for duplicate email accounts issue 2026-01-29 09:32:22 -05:00
cc968f6c5f Enable remarkbox-theme-meta dependency for deployment 2026-01-29 09:16:15 -05:00
8d838dbcba Fix merge script to handle duplicate namespace/watcher constraints 2026-01-29 09:15:33 -05:00
8b4d0bdeb6 Add GitLab pipeline status check to CLAUDE.md 2026-01-29 09:12:04 -05:00
9330782999 Fix case-sensitive email duplicates and add merge script
- Normalize emails to lowercase on user creation
- Use case-insensitive lookup in get_user_by_email
- Add merge_duplicate_email_users script to merge existing duplicates
- Add unit and integration tests to prevent regression
- Update CLAUDE.md with tmux-hosts production troubleshooting
2026-01-29 08:33:35 -05:00
df5c656eb0 Add whitespace between thread and new message form 2026-01-29 07:31:01 -05:00
32b1eae840 Fix getElementById('') warning when no hash fragment present 2026-01-28 07:50:45 -05:00
8971a46659 Hide preview toggle when JavaScript is disabled 2026-01-24 08:35:35 -05:00
67648f06f9 Persist preview visibility state in localStorage 2026-01-24 08:04:37 -05:00
2f8e676f78 Add template syntax validation tests
Validates all Jinja2 templates can be parsed without syntax errors.
Catches issues like mismatched {% if %}/{% endif %} blocks before deployment.
2026-01-22 12:48:02 -05:00
a49446cfef Add parallel test execution with pytest-xdist
Implements per-worker database isolation for parallel test runs:
- Add pytest-xdist and pytest-cov to test dependencies
- Configure Makefile to run tests with -n auto flag
- Update test.ini to use environment variable for database path
- Create conftest.py with per-worker database isolation
- Enable SQLite WAL mode for better concurrency
- Auto-cleanup test databases after completion

Expected performance improvement similar to make_post_sell (~16x speedup).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 12:36:31 -05:00
06ba106795 Fix sitemap lastmod date format for Google 2026-01-11 09:28:59 -05:00
a6c04d565a Add google_site_verification support for namespaces
- Add google_site_verification column to rb_namespace table
- Add settings form field in Stand-alone Mode Settings
- Render meta tag on root path when set
- Update CLAUDE.md with Alembic migration workflow
- Fix development.ini alembic paths
2026-01-11 09:11:07 -05:00
9936b21467 Add twine-venv target in /tmp for PyPI uploads
Uses a persistent virtualenv in /tmp/twine-venv to avoid
relying on system python/twine in CI.
2025-12-29 09:35:08 -05:00
00edd84398 Update .gitlab-ci.yml file 2025-12-29 14:31:53 +00:00
a362190ea5 Update .gitlab-ci.yml 2025-12-29 14:29:28 +00:00
033fe1f1a7 Update setup.py 2025-12-29 14:26:10 +00:00
43f794e385 Merge branch 'anonymous' into 'main'
Add allow_anonymous namespace setting for email-free commenting

See merge request engineering/remarkbox/remarkbox!29
2025-12-20 16:26:51 +00:00
6b2be261f5 Add functional tests for anonymous commenting feature
Tests cover:
- Anonymous reply creates UserSurrogate
- Anonymous reply with no name defaults to 'Anonymous'
- Regular namespace still requires email
- Anonymous comments are marked as verified
- Namespace settings toggle for allow_anonymous
2025-12-20 11:17:12 -05:00
19415fff06 Add allow_anonymous namespace setting for email-free commenting
When enabled, commenters can post with just a display name (no email required).
Comments are attached to UserSurrogate instead of User.

Trade-offs for anonymous commenters:
- No email notifications for replies
- Cannot edit their comments
- Cannot log in to manage comments
- No cross-site identity

Works with existing moderation (hide_unless_approved) - anonymous
comments are never auto-approved when moderation is enabled.
2025-12-20 11:06:31 -05:00
8b353fc7ec Merge branch 'import-comments-feature' into 'main'
Add import comments feature with support for WordPress, Disqus, and Graphcomment

See merge request engineering/remarkbox/remarkbox!26
2025-12-20 15:41:40 +00:00
58da72d344 Fix overflow hidden cutting off avatars on mobile 2025-12-20 07:07:00 -05:00
e0fbd06e10 Add CSS animation for node-children collapse/expand 2025-12-20 06:26:53 -05:00
89abc7e7af Move Step 3 payment form back into proper position 2025-12-19 22:05:23 -05:00
952120e5c5 Fix test to match new billing page text 2025-12-19 22:00:44 -05:00
5c2a279eb6 Move payment form outside conditionals so it always shows 2025-12-19 21:56:12 -05:00
2762fcd792 Add inline payment form to setup page 2025-12-19 21:53:08 -05:00
f1107b17a0 Simplify billing to minimal inline form 2025-12-19 21:50:19 -05:00
4d319c5647 Simplify billing to single pay-what-you-want form 2025-12-19 21:48:53 -05:00
de1e7ca83b Streamline billing page to single payment form
- Replace multiple forms with single unified payment form
- Remove deprecated pay_what_you_can preferences (no longer needed with Stripe Checkout)
- Remove pay-what-you-can route and view
- Simplify setup-namespace to just link to billing
- Update tests for new billing UI
2025-12-19 21:40:12 -05:00
f4baebedc6 Merge branch 'stripe-neo' into 'main'
Replace deprecated Stripe Sources API with Stripe Checkout

See merge request engineering/remarkbox/remarkbox!28
2025-12-20 02:31:52 +00:00
499ce162e4 Replace old card UI with link to billing page in setup-namespace 2025-12-19 21:27:42 -05:00
a6b527a6b2 Add cascade delete to payments relationship 2025-12-19 21:23:48 -05:00