From 583026418d833776a818dcbccb7008e3e4255c2c Mon Sep 17 00:00:00 2001 From: Kolkman Date: Wed, 26 Aug 2026 22:30:07 +0200 Subject: [PATCH] Format change in toots --- VIBE/CHAT_LOG.md | 12 ++++++++++++ VIBE/PROMPTS.md | 2 ++ backend/app/services/plugin_manager.py | 4 +++- backend/tests/test_api.py | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/VIBE/CHAT_LOG.md b/VIBE/CHAT_LOG.md index d57d9b1..1dbe0d0 100644 --- a/VIBE/CHAT_LOG.md +++ b/VIBE/CHAT_LOG.md @@ -1,5 +1,17 @@ # Chat Log +### User +When posting to Mastodon change the formatting so there is an empty line between “From my #LinkLog:” and the title. + +### Assistant outcome +Updated the Mastodon formatter so the prefix and title are separate paragraphs: `From my #LinkLog:` followed by a blank line and then the title. Existing comment, source URL, and tag paragraph formatting remains unchanged. + +### User +Check the modified pages for the correct link because a version number was added to the signed XPI. + +### Assistant outcome +Verified that the signed artifact is `XPI/signed/LinkLog-0.1.0.xpi` and that the About page, Profile page, `webextension/updates.json`, README, and related regression test all reference the matching versioned filename. No changes were required. + ### User In the Profile page below the Save profile button add “If you have not downloaded the plugin yet find it here” with a link to the signed plugin. diff --git a/VIBE/PROMPTS.md b/VIBE/PROMPTS.md index c2b4453..5bfa05b 100644 --- a/VIBE/PROMPTS.md +++ b/VIBE/PROMPTS.md @@ -206,6 +206,8 @@ 199. Fix Firefox manifest compatibility warnings by aligning the minimum version with data collection permissions and session storage support. 200. Add a Plugin section to the About page with a download link to the signed XPI file. 201. Below the Save profile button, add a link to download the signed plugin if it has not been downloaded yet. +202. Check the modified pages for the correct versioned signed XPI link. +203. When posting to Mastodon, add an empty line between "From my #LinkLog:" and the title. ## Future entries diff --git a/backend/app/services/plugin_manager.py b/backend/app/services/plugin_manager.py index 4891e26..28b6280 100644 --- a/backend/app/services/plugin_manager.py +++ b/backend/app/services/plugin_manager.py @@ -68,7 +68,9 @@ class MastodonPlugin(BasePlugin): post_prefix = f'#{str(config["hashtag"]).strip().lstrip("#")} ' post_prefix = str(post_prefix if post_prefix is not None else DEFAULT_POST_PREFIX).strip() title = str(event.get('title') or '').strip() - status_parts = [f'{post_prefix} {title}'.strip()] + status_parts = [post_prefix.strip()] + if title: + status_parts.append(title) if event.get('comment'): status_parts.append(event['comment']) if title: diff --git a/backend/tests/test_api.py b/backend/tests/test_api.py index fa4df4e..cc95689 100644 --- a/backend/tests/test_api.py +++ b/backend/tests/test_api.py @@ -796,7 +796,7 @@ def test_link_submission_posts_to_enabled_mastodon_plugin(): assert received['path'] == '/api/v1/statuses' assert received['authorization'] == 'Bearer test-token' assert received['content_type'] == 'application/x-www-form-urlencoded' - assert received['body'] == {'status': ['From my #LinkLog: A useful page\n\nWorth sharing\n\nfrom: https://example.com/useful\n\n#python #web']} + assert received['body'] == {'status': ['From my #LinkLog:\n\nA useful page\n\nWorth sharing\n\nfrom: https://example.com/useful\n\n#python #web']} posted_item = next(item for item in client.get('/api/public/feed/alice', headers=headers).json() if item['id'] == response.json()['id']) assert posted_item['mastodon_posted'] is True finally: