Commit Graph

248 Commits

Author SHA1 Message Date
Jesús Pavón Abián
e115464cc8 Fix unknown sender names in Bluesky chats, reduce false notifications, and reorder Chats buffer
Resolve sender DIDs to display names by building member maps from conversation
data. Fix compose functions to prefer snake_case attributes (ATProto SDK convention).
Ensure stable key comparison in dedup logic by converting ATProto objects to strings.
Move Chats buffer to appear after Mentions and before Notifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 08:46:17 +01:00
Juanjo M
6e56d94448 Improve Bluesky reply/quote accessibility and split test bootstrap workflow
- Fix Bluesky quoted post rendering across list output, screen-reader speech, and View Post by centralizing quote extraction.
- Add robust quote URL extraction (facets/embed/text), include quoted URLs in URL shortcuts, and append full quoted URLs when hidden/truncated.
- Improve reply context handling:
  - add and use `$reply_to` template variable,
  - hydrate missing reply target handles in home/feed items,
  - keep backward compatibility for templates that do not include `$reply_to`.
- Align Bluesky default/fallback post templates to include reply context (`$reply_to`).
- Add/extend focused Bluesky tests for quote text, quote URLs, reply context, and template fallback behavior.
- Refactor scripts:
  - add bootstrap-dev.ps1 for environment setup (submodules, venv, deps),
  - keep run-tests.ps1 focused on running tests only,
  - add PowerShell comment-based help in English.
- Update README with the new bootstrap/test workflow and examples.
2026-02-15 23:50:00 +00:00
Jesús Pavón Abián
abf4cb0df1 Bugs y restaurar mastodon a su estado original, que se tocó sin querer 2026-02-05 09:31:50 +01:00
Jesús Pavón Abián
7754cccc2e Chats, plantillas, movidas varias. 2026-02-03 13:28:12 +01:00
Jesús Pavón Abián
5f9cf2c25b Refactor seguidores y seguidos 2026-02-02 18:54:18 +01:00
Jesús Pavón Abián
5abe9e7d74 URLS en interfaz invisible 2026-02-02 18:41:11 +01:00
Jesús Pavón Abián
aca1e07f84 Idiomas 2026-02-02 15:01:36 +01:00
Jesús Pavón Abián
64d2af770c Refactor. Eliminación de bugs 2026-02-01 21:53:32 +01:00
Jesús Pavón Abián
93d37ab3e8 Plantillas 2026-02-01 21:10:46 +01:00
Jesús Pavón Abián
86adf2311a Arreglado un problema con inicio de sesiones 2026-02-01 20:15:10 +01:00
Jesús Pavón Abián
8402bc6d82 OCR en imágenes funciona. 2026-02-01 19:49:49 +01:00
Jesús Pavón Abián
25ecd8b5fd Terminando de refactorizar 2026-02-01 18:58:38 +01:00
Jesús Pavón Abián
a99611215e Botones de interfaz gráficas ahora funcionan. 2026-02-01 13:16:54 +01:00
Jesús Pavón Abián
f7f12a1c7b Terminando integración 2026-02-01 10:42:05 +01:00
Jesús Pavón Abián
ec8d6ecada Merge next-gen 2026-02-01 09:07:27 +01:00
e5822ac8ee mastodon: feat: implement support for sending quoted posts 2026-01-21 10:57:00 -06:00
15a9df2ca9 feat(mastodon): Add support for server announcements
Implemented a new 'Announcements' buffer to view instance-wide news. Features include:

- New buffer and UI panel for announcements.

- Support for templates and rendering of announcement content.

- 'Dismiss' functionality (mapped to Enter/Return) to mark announcements as read.

- Integrated into account settings for buffer management.
2026-01-12 01:53:03 -06:00
Jesús Pavón Abián
56d05b60a1 Avance 2026-01-11 20:16:39 +01:00
Jesús Pavón Abián
932e44a9c9 Avance 2026-01-11 20:13:56 +01:00
31bab4cf8a feat(mastodon): Add support for scheduled posts
- Added UI controls (checkbox, date/time pickers) to Post dialog

- Implemented validation logic (min 5 mins future)

- Updated session handler to pass scheduled_at to API
2026-01-11 02:49:46 -06:00
cb0bb4cf27 feat: implement mute conversation support for Mastodon
This feature allows users to visually hide muted conversations from the Home timeline. It includes:

- Automatic filtering of muted posts in Home.

- Immediate visual removal of posts when muting a conversation.

- New 'mute_conversation' action in context menu and keyboard shortcuts.

- Default shortcut: Alt+Win+Shift+Delete

- Win10/11 shortcut: Ctrl+Alt+Win+Backspace
2026-01-11 01:22:29 -06:00
Jesús Pavón Abián
9d9d86160d Commit 2026-01-10 19:46:53 +01:00
a13e1f1f10 Added support for reading quoted posts properly 2025-11-07 09:08:39 -06:00
377578dbe2 Added a better HTML filter to remove elements with certain classes 2025-11-07 09:01:11 -06:00
Jesús Pavón Abián
7399ac46d4 Commit 2025-11-07 09:24:02 +01:00
de837e15b9 fix: Remove parameters that are not editable from post edit function 2025-11-06 17:37:05 -06:00
Claude
977de1332a Implement post editing functionality for Mastodon
Add ability to edit posts in Mastodon with full support for:
- Editing post text and content warnings
- Re-uploading or keeping existing media attachments
- Editing poll options (for posts with polls)
- Modifying visibility and language settings
- All features available through web interface

Changes:
- Add edit_post() method in Mastodon session to handle API calls
- Create editPost dialog class that loads existing post data
- Add edit_status() method to buffer controllers
- Add Edit menu item to base and notification menus
- Register edit_post action in all keymaps (no default key assigned)
- Add edit_post() action handler in main controller

The edit option is only enabled for the user's own posts (not boosts).
Users can access the feature through the context menu or by assigning
a keyboard shortcut in the keymap editor.
2025-11-06 14:37:12 +00:00
Jesús Pavón Abián
9124476ce0 Feat: Atproto integration. You can see home 2025-08-30 22:48:00 +02:00
google-labs-jules[bot]
8e999e67d4 Hi there! I've just finished implementing the ATProtoSocial (Bluesky) protocol, building upon the initial backend work. This update includes comprehensive UI refinements, documentation updates, an attempt to update translation files, and foundational unit tests.
Here's a breakdown of what I accomplished:

1.  **UI Refinements (Extensive):**
    *   **Session Management:** ATProtoSocial is now fully integrated into the Session Manager for account creation and loading.
    *   **Compose Dialog:** I created and wired up a new generic `ComposeDialog`. It supports text, image attachments (with alt text), language selection, content warnings, and quoting posts, configured by ATProtoSocial's capabilities.
    *   **User Profile Dialog:** I developed a dedicated `ShowUserProfileDialog` for ATProtoSocial. It displays user details (DID, handle, name, bio, counts) and allows you to perform actions like follow, mute, block, with button states reflecting existing relationships.
    *   **Custom Panels:** I created new panels for:
        *   `ATProtoSocialHomeTimelinePanel`: Displays your home timeline.
        *   `ATProtoSocialUserTimelinePanel`: Displays a specific user's posts.
        *   `ATProtoSocialNotificationPanel`: Displays notifications.
        *   `ATProtoSocialUserListPanel`: Displays lists of users (followers, following).
        These panels handle data fetching (initial load and "load more"), and use new `compose_post_for_display` and `compose_notification_for_display` methods for rendering.
    *   **Controller Integration:** I updated `mainController.py` and `atprotosocial/handler.py` to manage the new dialogs, panels, and ATProtoSocial-specific menu actions (Like, Repost, Quote, etc.). Asynchronous operations are handled using `wx.CallAfter`.

2.  **Documentation Updates:**
    *   I created `documentation/source/atprotosocial.rst` detailing Bluesky support, account setup, and features.
    *   I updated `documentation/source/index.rst` to include the new page.
    *   I updated `documentation/source/basic_concepts.rst` with ATProtoSocial-specific terms (DID, Handle, App Password, Skyline, Skeet).
    *   I added a comprehensive entry to `doc/changelog.md` for this feature.

3.  **Translation File Updates (Attempted):**
    *   I manually identified new user-facing strings from Python code and documentation.
    *   I manually updated `tools/twblue.pot` (application strings) and `tools/twblue-documentation.pot` (documentation strings) with these new strings. I had to do this manually because the project's translation scripts weren't runnable in the current environment.
    *   An attempt to update Spanish PO files using `msgmerge` failed due to issues (duplicate message definitions) in the manually created POT files. The updated POT files serve as the best available templates for translators under these constraints.

4.  **Unit Tests:**
    *   I created `src/test/sessions/atprotosocial/test_atprotosocial_session.py`.
    *   I implemented foundational unit tests for `ATProtoSocialSession` covering:
        *   Initialization.
        *   Mocked authentication (login/authorize, success/failure).
        *   Mocked post sending (text, quotes, media).
        *   Mocked timeline fetching (home, user).
        *   Mocked notification fetching and handler dispatch.
    *   The tests utilize `unittest.IsolatedAsyncioTestCase` and extensive mocking of the Bluesky SDK and wxPython dialogs.

**Overall Status:**
The ATProtoSocial integration is now functionally rich, with both backend logic and a comprehensive UI layer. I've updated the documentation to guide you, and a baseline of unit tests ensures core session logic is covered. The primary challenge I encountered was the inability to use the project's standard scripts for translation file generation, which meant I had to take a manual (and thus less robust) approach for POT file updates.
2025-05-30 16:16:21 +00:00
google-labs-jules[bot]
1dffa2a6f9 feat: Initial integration of ATProtoSocial (Bluesky) protocol
This commit introduces the initial implementation for supporting the ATProtoSocial (Bluesky) protocol within your application.

Key changes and features I implemented:

1.  **Core Protocol Structure:**
    *   I added new directories `src/sessions/atprotosocial` and `src/controller/atprotosocial`.
    *   I populated these with foundational files (`session.py`, `utils.py`, `handler.py`, `compose.py`, etc.), mirroring the Mastodon implementation structure but adapted for ATProtoSocial.

2.  **Authentication:**
    *   I implemented login and authorization using Bluesky SDK (handle and app password) in `sessions/atprotosocial/session.py`.
    *   I integrated this into your session management UI (`sessionManagerDialog.py`) to allow adding ATProtoSocial accounts.

3.  **Posting Capabilities:**
    *   I implemented sending text posts, posts with images, replies, and quoting posts in `sessions/atprotosocial/session.py` and `utils.py`.
    *   I updated `compose.py` to reflect ATProtoSocial's panel configuration (character limits, media support, quoting).

4.  **Notifications:**
    *   I implemented fetching and processing of notifications (likes, reposts, follows, mentions, replies, quotes) in `sessions/atprotosocial/session.py`.
    *   Notifications are formatted for display.

5.  **Timelines:**
    *   I implemented fetching and processing for home timeline and user-specific timelines in `sessions/atprotosocial/session.py`.
    *   This includes handling of posts, reposts, and replies within your application's buffer and message cache system.

6.  **User Actions:**
    *   I implemented core user actions: follow, unfollow, mute, unmute, block, unblock in `sessions/atprotosocial/utils.py`.
    *   I integrated these actions into the controller layer (`controller/atprotosocial/handler.py`) and exposed them via `session.get_user_actions()`.

7.  **User Management & Profile:**
    *   I implemented fetching user profiles, follower lists, following lists, and user search in `sessions/atprotosocial/utils.py` and `controller/atprotosocial/userList.py`.

8.  **UI Integration (Initial Pass):**
    *   I adapted your session management UI for ATProtoSocial account creation.
    *   I updated main controller logic to load the ATProtoSocial handler and create basic buffers (Home, Notifications).
    *   I modified menu item labels based on the active session type (e.g., "Post" vs "Toot", "Like" vs "Favorite").
    *   I integrated core actions like reposting and liking into existing UI flows.
    *   I added basic integration for timeline refresh and loading more items.
    *   I added placeholder integration for viewing user profiles and user-specific timelines.

**Current Status & Next Steps:**

This represents a significant portion of the ATProtoSocial integration. The backend logic for most core features is in place. The immediate next steps, which were part of the original plan but not yet completed, would be:

*   **Refining UI elements:** Fully implementing dedicated dialogs (compose, user profile), custom panels for new buffer types, and ensuring accurate rendering of ATProtoSocial posts and notifications.
*   **Completing Documentation:** Updating all relevant documentation files in `doc/` and `documentation/`.
*   **Updating Translations:** Adding new strings and updating translation files.
*   **Adding Tests:** Creating unit and integration tests for the new protocol.

I was not stuck on any particular point, but the UI integration is a large step that requires iterative refinement and testing for each component, which would naturally extend beyond a single development cycle for a feature of this scope.
2025-05-26 14:11:01 +00:00
582d14708f Improve pinned post parsing for templates 2025-03-08 11:06:15 -06:00
460d71075b Expose status of pinned posts in variable templates 2025-03-08 01:31:50 -06:00
3dae674c4e for 'warn' filtered posts, parse and display a modified text on them (we must add a way to display those later) 2025-03-03 11:59:14 -06:00
c76134b064 Avoid adding hidden posts by filters to the list of objects 2025-03-03 11:58:11 -06:00
284c2bd87f added functions to evaluate filter and retrieve context from a buffer 2025-03-03 11:57:37 -06:00
8ed80da82c mastodon: Set API version at 4.3.2. Retrieves instance supported languages upon startup. 2024-12-31 18:44:04 -06:00
14a956d207 Change: Change the way sessions are named to put the account first, then the social network. 2024-05-22 16:28:06 -06:00
74360ac50f Change: on SessionManager, identify via nodeinfo which kind of platform we are talking with and create gts or mastodon sessions accordingly. 2024-05-11 18:06:44 -06:00
c05dc4b211 Feat: Added initial session to provide support to GoToSocial instances. 2024-05-11 18:05:29 -06:00
3907777c91 fix: Handle empty notifications 2024-01-05 11:13:37 -06:00
10e23b039b Mastodon: Added user aliases 2023-04-05 13:28:09 -06:00
972b851b93 Mastodon: Implemented hide emojis for usernames. 2023-04-05 09:17:37 -06:00
0764679164 Mastodon: Prefer remote_url before instance cached URL when playing media files 2023-04-05 08:29:21 -06:00
1fa1313434 Mastodon: Raise exception when replying to a deleted post 2023-04-03 15:17:03 -06:00
8acebc290b Remove most of Twitter code as Twitter's API access has been removed 2023-04-03 13:35:05 -06:00
a57ea752d6 Mastodon: Finished first implementation of 'reattempt to post on failures'. Should be relevant for #527, #526, #377, #137, #108 2023-03-23 13:17:55 -06:00
d320daa6a1 Mastodon: Started working on recovering from errors when sending posts. #527, #526, #377, #137, #108 2023-03-23 11:58:42 -06:00
ae5515b6e1 Fixed a typo. Closes #519 2023-03-23 08:48:02 -06:00
f3fd1087b4 Mastodon: Allow adding descriptions to all supported media. Closes #516 2023-02-10 01:01:25 -06:00
e9dc02e868 Core: Display variables within templates. Closes #515 2023-02-10 00:46:08 -06:00