Commit Graph
100 Commits
Author SHA1 Message Date
retoor b6476f3bf0 fix: ensure socket cleanup in websocket handler by wrapping async iteration in try/finally block 2025-12-17 21:54:25 +00:00
retoor df8986715d refactor: remove presence debounce and simplify websocket error handling in rpc view 2025-12-17 21:47:21 +00:00
retoor 3dce95e38c chore: remove umami analytics script tag from app.html template 2025-12-17 21:18:42 +00:00
retoor 2534b7572e chore: bump version to 1.4.0 and simplify user dict access in socket service 2025-12-17 21:09:54 +00:00
retoor c712bc58c1 feat: add debounced user presence join/depart notifications with 3-second delay in socket service 2025-12-17 20:54:07 +00:00
retoor cf6e9eec7a chore: remove umami analytics script and csp connect-src from middleware and template 2025-12-17 17:34:32 +00:00
retoor d0eb7fad17 fix: replace safe dict access with direct access and add null check for starField in message-list.js 2025-12-17 17:24:08 +00:00
retoor 4b388e890d fix: replace hardcoded channel_uid with dynamic variable in broadcast and fix db_query signature 2025-12-14 23:10:50 +00:00
retoor 155c914c34 fix: correct UserPropertyModel field name and add missing db commit in service
- Fix UserPropertyModel value field name from "path" to "value" in user_property.py
- Add self.mapper.db.commit() call after upsert in UserPropertyService to persist changes
- Refactor CSS across base.css, buttons.css, inputs.css, generic-form.css, and fancy-button.js to unify dark theme with monospace font, consistent border-radius (4px), and transition effects
- Introduce new buttons.css and inputs.css stylesheets with reusable .btn, .input, .textarea, .select classes and variants (primary, secondary, danger, success, sizes)
- Update sidebar navigation styling with active state indicator and hover border-left highlight
- Revise dialog button styles to match new design system with border, background, and hover states
- Adjust generic-form and generic-field components to use new font, colors, and focus ring (box-shadow) instead of outline
2025-12-05 18:17:09 +00:00
retoor e52c7c4f76 docs: remove obsolete GIT_INTEGRATION.md guide from snek templates
The entire GIT_INTEGRATION.md file was deleted from src/snek/templates/,
removing the outdated Git integration documentation that covered repository
creation, cloning workflows, and web interface features. This file is no
longer needed as the integration details have been superseded by newer
documentation or the feature set has changed.
2025-12-05 17:16:04 +00:00
retoor b93f618d21 feat: add profile page management, default forum creation, and bcrypt dependency
Add ProfilePageMapper, ProfilePageModel, and ProfilePageService to support user profile pages with slug-based routing, ordering, and publish state. Register profile page views in the application router. Implement automatic creation of a default "General Discussion" forum on startup if no active forums exist. Add bcrypt to core dependencies and pytest with asyncio support as optional test dependencies. Refactor forum event dispatch to use inspect for robust async/sync listener handling. Extend RepositoryModel with optional description field. Update SQL schema to include IP geolocation fields on user table and history_start on channel table.
2025-12-05 17:15:36 +00:00
retoor 18cf101080 fix: remove vulnerable code and fix syntax errors in WebSocket and Dataset classes 2025-11-06 03:13:36 +00:00
retoor 4d5a7c0500 docs: expand project quality review with full codebase analysis covering all Python modules in src/snek recursively
The review now includes detailed analysis of every Python file in the project, covering Docker integration, Git support, system modules, and additional architectural patterns discovered during the comprehensive codebase examination.
2025-11-06 03:12:06 +00:00
retoor 490f820f5f docs: add comprehensive project quality review document for Snek codebase
This commit introduces a new review.md file that provides a detailed quality assessment of the Snek project, covering its modular architecture, asynchronous design, feature set, and identified weaknesses including syntax errors in serpentarium.py and sync.py, incomplete code summaries, potential security concerns with WebSocket authentication and raw SQL queries, and code quality issues.
2025-11-06 03:05:42 +00:00
retoor e737dcddb2 feat: add last_read_at tracking and jump-to-first-unread button in chat UI
Add `last_read_at` column to `channel_member` table and set it in `mark_as_read` service method. Implement `get_first_unread_message_uid` RPC endpoint that queries the first message after the member's last read timestamp. Introduce a "Jump to First Unread" button in the web template with `checkForUnreadMessages` and `jumpToUnread` JavaScript functions to show/hide the button and scroll to the unread message element.
2025-11-03 17:08:13 +00:00
retoor 71f94db41f chore: remove aiohttp_debugtoolbar import and commented setup, restyle sidebar typography and link spacing
- Remove unused `aiohttp_debugtoolbar` import and its commented-out setup call in `app.py`
- Increase sidebar top padding from 10px to 20px for better vertical rhythm
- Reduce heading font-size to 0.75em, add uppercase transform, letter-spacing, and margin-top
- Add `:first-child` rule to reset top margin on first sidebar heading
- Tighten list item spacing from 15px to 4px, reduce link font-size to 0.9em
- Add block display, padding, border-radius, and hover background transition to sidebar links
2025-10-28 19:50:53 +00:00
retoor 57d86e2620 feat: cache generated avatars in app storage to avoid redundant multiavatar calls 2025-10-02 14:28:38 +00:00
retoor bbe8022eb1 fix: enable cache by default and remove async lock from get/set methods 2025-09-30 17:54:39 +00:00
retoor c6c8ea1c30 fix: disable cache by default and remove version comment in Cache class
The cache is now disabled by default (self.enabled = False) to prevent stale data serving until explicitly enabled. Additionally, the inline comment documenting the version calculation was removed to clean up the code.
2025-09-30 17:47:17 +00:00
retoor d139731720 fix: enable cache by default and add async lock for thread safety in Cache class 2025-09-30 17:35:56 +00:00
retoor a35415f549 chore: remove obsolete prototype SSH server scripts from src/snekssh directory 2025-09-30 17:28:59 +00:00
retoor 2234147845 fix: replace dict with OrderedDict for O(1) LRU operations and disable cache by default 2025-09-30 17:27:07 +00:00
retoor 34adf19bbe feat: refactor cache to use OrderedDict with async lock for thread-safe LRU eviction
Replace the plain dict cache with an OrderedDict-based implementation that
provides O(1) LRU eviction by re-inserting accessed items at the end.
Introduce an asyncio.Lock to ensure thread-safe concurrent access during
get/set operations. Enable caching by default (self.enabled = True) and
add import for asyncio and OrderedDict.
2025-09-30 17:14:16 +00:00
retoor 497cc0b9f7 fix: wrap synchronous _execute call in asyncio.to_thread for non-blocking mapper execution 2025-09-30 15:36:22 +00:00
retoor 0a05da7067 refactor: remove unused prepare_stats startup hook and stats structure from Application class 2025-09-30 15:20:02 +00:00
retoor 05272b9a72 fix: remove deprecated stats.html route from router setup 2025-09-30 15:18:48 +00:00
retoor cd39881fd4 feat: remove deprecated stats module and its middleware from application stack
Remove the entire `snek.system.stats` module including its middleware, statistics structure creation, and websocket stats tracking. This eliminates the `stats_middleware` from the application middleware chain, removes the `update_websocket_stats` calls from the RPC view handler, and deletes the 129-line stats module with its time-series SVG generation and granularity-based counter logic.
2025-09-30 15:17:06 +00:00
retoor 98b21c1bf5 feat: add logging configuration with basicConfig at INFO level in __main__.py 2025-09-22 12:15:53 +00:00
retoor 837010302c feat: add render_template timing instrumentation and disable cache in system modules
- Add performance timing with time.perf_counter() to render_template method in Application class, printing elapsed seconds to stdout
- Disable cache by setting self.enabled = False in Cache.__init__ to bypass caching behavior
- Add early return in ChannelMessageService.maintenance() to skip message iteration loop
- Remove default_limit class attribute assignment in BaseMapper.__init__ and add time import
- Refactor run_in_executor to execute synchronously with _execute() call and wrap semaphore around a second _execute() call instead of using thread pool executor
2025-09-22 12:14:30 +00:00
retoor 6e75d38979 chore: comment out debug console logs in Chat and ChatInputComponent 2025-09-22 11:30:53 +00:00
retoor 37dccf9da2 fix: remove trailing semicolons and fix whitespace inconsistencies in chat-input.js
- Removed trailing semicolons from arrow function bodies in hiddenCompletions object
- Fixed inconsistent indentation for _leetSpeak toggle and textarea classList assignment
- Replaced spread operator with Object.assign for allAutoCompletions getter
- Truncated extractMentions regex pattern at diff boundary
2025-09-17 20:55:31 +00:00
retoor 538d92b538 fix: guard mention replacement against null closestAuthor in chat input 2025-09-17 14:30:20 +00:00
retoor e980265aeb fix: fix whitespace formatting and trailing commas in chat-input.js 2025-09-17 14:27:04 +00:00
retoor 2f74ae9e74 fix: set closestAuthor to 0 when minDistance drops below 5 in chat input mention detection 2025-09-17 14:20:59 +00:00
retoor a16ccd82fe feat: add new chat view with WebSocket-based messaging component
Introduce a new `NewView` class in `src/snek/view/new.py` that renders the `new.html` template, requiring authentication. The template includes a custom `ChatWindow` web component that establishes a WebSocket connection via the `Socket` class, handles channel-based messaging with real-time updates, and supports sending messages on Enter key press while allowing Shift+Enter for multi-line input.
2025-09-17 14:12:05 +00:00
retoor dc1b36e68e feat: add NewView route and fix leet check and push notification handling
- Register NewView at /new.html endpoint in Application router
- Fix textToLeetAdvanced to require s.length > 1 for valid leet match
- Comment out event.waitUntil(reg) in service-worker push handler to prevent potential hang
2025-09-17 14:09:48 +00:00
retoor 4a51c2d386 fix: add console.info logging and increase reconnect delay to 4 seconds in socket.js
- Added console.info call to log event name and data payload in the data handler
- Changed reconnect timeout from 0ms to 4000ms to introduce deliberate delay before reconnection attempt
2025-09-16 02:46:44 +00:00
retoor 51ed3b2fd2 fix: reduce default ProcessPoolExecutor max_workers from 3 to 1 in ChannelMessageService init 2025-09-15 03:00:11 +00:00
retoor 301c55cfdd fix: add debug logging for closest author and min distance in chat input component 2025-09-15 00:22:03 +00:00
retoor 0104f5ef85 fix: increase default max_workers to 3 and use instance variable for executor pool size 2025-09-15 00:12:52 +00:00
retoor fe57aab360 fix: increase ProcessPoolExecutor max_workers from 1 to 10 in channel message service 2025-09-15 00:09:04 +00:00
retoor c5ea835dff fix: reduce default ProcessPoolExecutor workers to 1 and add debug logging
The change reduces the default `max_workers` for `ProcessPoolExecutor` from 5 to 1 in the `get_or_executor` method of `ChannelMessageService`, and adds a debug print statement to log the number of available executors.
2025-09-14 22:58:29 +00:00
retoor b6ada2c753 chore: add duplicate defer attribute to umami analytics script tag in app.html 2025-09-14 20:53:05 +00:00
retoor 5cd88ccb9b fix: prevent premature removal of non-final messages in upsertMessage
The change modifies the conditional logic in `MessageList.upsertMessage()` to only remove and nullify an existing message when `data.message` is falsy, instead of doing so when `data.is_final` is true or `data.message` is falsy. This ensures that non-final messages with content are not incorrectly removed from the DOM before being updated or re-inserted.
2025-09-09 21:40:33 +00:00
retoor 8b15e08014 feat: replace ThreadPoolExecutor with ProcessPoolExecutor and add Jinja2 template rendering for channel messages 2025-09-08 04:08:12 +00:00
retoor 7a0f58451a fix: reduce per-user executor pool max_workers from 5 to 1 in ChannelMessageService
The change limits concurrent thread execution per user to a single worker,
preventing resource exhaustion from unbounded thread creation in the
get_or_create_executor method.
2025-09-07 23:09:22 +00:00
retoor 088dbbf3da feat: replace global thread pool with per-user executor pools in ChannelMessageService
Remove the module-level `executor` variable and introduce instance-level `_executor_pools` dict with `get_or_create_executor` method that creates a `ThreadPoolExecutor(max_workers=5)` per user UID. Update all `run_in_executor` calls in `render_message` and `render_message_edit` to use the per-user executor instead of the shared global one, improving isolation and resource control across concurrent user requests.
2025-09-07 22:59:11 +00:00
retoor 8d4511a2bf fix: prevent avatar anchor from being overwritten by later matches in message-list.js
The loop iterating over avatar elements now only assigns the first matching anchor to `lastElement`, ensuring the scroll target remains the earliest occurrence instead of being overwritten by subsequent matches.
2025-09-07 00:42:47 +00:00
retoor 77d7186c86 fix: add debug print before socket deletion in RPCView error handlers
Add a debug print statement in the `send` method's exception handler to log the exception message before deleting the socket, and update the existing debug print in the message processing loop to include a distinctive prefix for easier log filtering.
2025-08-31 01:41:41 +00:00
retoor 86b0ae6db4 fix: correct indentation of user_availability_service method in socket.py
The method definition was incorrectly placed at module level instead of being properly indented as a member of the SocketService class. This fix moves the async def user_availability_service declaration one level deeper to align with the class body, restoring correct Python scoping and preventing AttributeError or runtime import failures when the service attempts to register or invoke this method.
2025-08-31 01:27:47 +00:00
retoor 7984feeb6d chore: add debug logging to user availability service loop
Add detailed debug-level log statements throughout the
user_availability_service method to trace execution flow, including
entry into the main loop, socket iteration, connection status checks,
user update decisions, database save operations, and sleep intervals.
2025-08-31 01:25:26 +00:00
retoor 50e800e5f2 fix: offload Jinja2 template rendering and sanitization to thread pool executor to avoid blocking async event loop 2025-08-31 01:22:00 +00:00
retoor f8670d8a38 feat: implement modal editor with vim-like modes and command-line interface
Replace the basic contenteditable editor with a full modal editor supporting insert, normal, and visual modes. Add a command-line interface at the bottom for executing commands like :w, :q, and :wq. Introduce mode-specific cursor styling, selection highlighting, and keyboard-driven navigation. The editor now tracks mode state, handles mode transitions via Escape and i/v keys, and displays the current mode in a status bar.
2025-08-06 13:33:13 +00:00
retoor c9673b7744 fix: copy user socket list before iteration to avoid mutation during send 2025-08-06 12:18:01 +00:00
retoor 791ef0bc13 feat: add sentry-sdk dependency and initialize sentry in main function
- Added sentry-sdk to project dependencies in pyproject.toml
- Imported and initialized sentry_sdk with DSN in main() function
- Added graceful fallback with print message if sentry_sdk import fails
2025-08-06 09:51:58 +00:00
retoor 448034e03e feat: disable login requirement for ChannelAttachmentView to allow public access to attachments 2025-08-03 01:31:08 +00:00
retoor 01a14370c9 fix: remove random sleep before rpc call in websocket message handler 2025-08-01 00:06:20 +00:00
retoor dbc34cebb1 fix: reduce randomized sleep range in websocket RPC handler from 0.1-0.4s to 0.01-0.1s 2025-07-31 23:59:23 +00:00
retoor b760fdd22b fix: add random sleep before RPC message processing in websocket handler
- Imported `random` module to support randomized delay
- Inserted `await asyncio.sleep(random.uniform(0.1, 0.4))` before `await rpc(msg.json())` in the websocket message loop
- This introduces a jitter of 100-400ms to desynchronize concurrent RPC processing from multiple clients
2025-07-31 23:57:18 +00:00
retoor 2cc616c8aa fix: move endOfMessages.after call before scroll check in MessageList
The `endOfMessages.after(message)` call was placed after the `isScrolledToBottom()` check, causing the scroll position to be evaluated before the new message was inserted into the DOM. This resulted in incorrect scroll behavior when messages were added, as the scroll check would not account for the newly inserted element. Moving the insertion before the scroll check ensures the scroll position is evaluated after the DOM has been updated with the new message.
2025-07-30 12:49:16 +00:00
retoor 32ed12f3db fix: correct missing closing parenthesis in upsertMessage condition check 2025-07-30 12:46:10 +00:00
retoor 1f89849c9a fix: correct conditional grouping in upsertMessage to remove stale messages
The diff shows a fix in the `upsertMessage` method of the `MessageList` class in `src/snek/static/message-list.js`. The original condition `(message && data.is_final) || !data.message` was incorrectly grouping the logical OR, causing messages to be removed only when `data.is_final` was true alongside a message, or when `data.message` was falsy regardless of message existence. The fix wraps the entire condition in parentheses: `(message && (data.is_final || !data.message))`, ensuring that a message is removed only if it exists AND either `data.is_final` is true or `data.message` is falsy. A comment `// TO force insert` was added to clarify the intent of nullifying the message reference after removal.
2025-07-30 12:44:25 +00:00
retoor 77802883fe fix: skip upsert for empty messages and clear stale entries in MessageList 2025-07-30 12:41:23 +00:00
retoor aa3d00243f fix: remove stale message from DOM only when is_final flag is set
Previously, the upsertMessage method removed any existing message element from the DOM whenever a message with the same uid was received, regardless of whether the update represented a final version. This caused premature removal of messages that were still being streamed or updated incrementally. Now the removal is gated on the `data.is_final` property, ensuring that only completed messages are replaced in the DOM while in-progress messages remain visible until their final state arrives.
2025-07-30 12:36:56 +00:00
retoor 9bad9a78ed feat: add HEAD route and lock-checking middleware to WebDAV handler 2025-07-30 01:25:36 +00:00
retoor c5df9e6463 feat: add MS-Author-Via header to WebDAV OPTIONS response and fix semicolons in message-list.js
- Add "MS-Author-Via: DAV" header to WebDAV OPTIONS handler for Microsoft WebDAV client compatibility
- Fix missing semicolons in message-list.js (LONG_TIME constant, ReplyEvent constructor)
- Remove trailing whitespace in import statement formatting
2025-07-30 00:51:26 +00:00
retoor 299f617988 fix: re-enable iframe elements in sanitize_html by commenting out removal logic 2025-07-26 21:56:24 +00:00
retoor 942098583d feat: add XSS sanitization to channel message rendering and refactor sanitize_html with BeautifulSoup
Add sanitize_html calls in ChannelMessageService for both render and save paths to strip script, iframe, object, embed tags and event handler attributes from rendered HTML templates. Refactor sanitize_html in template.py to use BeautifulSoup for tag removal and attribute cleaning, replacing the previous bleach-only implementation with a new sanitize_html2 function retained for compatibility.
2025-07-25 15:17:45 +00:00
retoor 8762e592d0 fix: remove whitelist_attributes call from message template rendering in ChannelMessageService
The whitelist_attributes filter was applied to the rendered HTML output in both
the get_by_uid and save methods of ChannelMessageService. This filter was
stripping allowed HTML attributes from the message content, which could break
formatting or functionality in rendered messages. The fix removes the filter
call, allowing the full rendered template output to be stored and returned
without attribute sanitization.
2025-07-25 15:10:03 +00:00
retoor 0a45ef2b8f fix: move whitelist_attributes call to post-render in channel message service 2025-07-25 15:05:41 +00:00
retoor bc924f4f85 fix: reduce default star count from 100 to 50 in StarField constructor and instantiation 2025-07-24 11:48:22 +00:00
retoor 4e31728de4 fix: move whitelist_attributes call before template render to prevent xss in channel messages 2025-07-23 23:46:34 +00:00
retoor d015e81069 feat: add is_dm property to ChannelModel and auto-join dm channels for members 2025-07-23 23:07:33 +00:00
retoor 0d5b91b6b4 fix: replace async iteration with sync find and add exception handling in ChannelMessageService.maintenance
Refactor the maintenance method to iterate over channel messages using synchronous `self.mapper.db["channel_message"].find()` instead of the async `self.find()` generator, wrapping each message processing in a try-except block that catches exceptions, prints them, and sleeps for 0.1 seconds before continuing.
2025-07-18 21:20:46 +00:00
retoor 4e66c895a6 fix: ensure message is fetched before save when html lacks chat-message tag 2025-07-18 15:49:01 +00:00
retoor b6afdca6d3 fix: replace redundant fetch-save pattern with direct save call in channel message service 2025-07-18 15:44:45 +00:00
retoor 56f313c88e feat: add request statistics middleware with time-series tracking and stats endpoint
- Import and register stats_middleware in the application middleware stack
- Add prepare_stats startup hook to initialize stats data structure
- Register /stats.html GET route with stats_handler for viewing statistics
- Create new snek/system/stats.py module with time-series data collection and SVG chart generation
- Integrate websocket statistics tracking in RPC view by calling update_websocket_stats before and after method execution
2025-07-17 22:43:37 +00:00
retoor 5bdf00fdd0 feat: add uploadResponses tracking array and reset after publish in file upload grid
The uploadResponses array is initialized in the component constructor to collect file upload results. The reset() call is moved inside the conditional block that fires when all uploads are complete, ensuring the component state is cleared only after the 'file-uploads-done' event has been published with the full response data. A console.info log is added for debugging the collected responses.
2025-07-14 17:11:46 +00:00
retoor 7af32a5036 feat: migrate forum queries to async generators and replace find_one with get method
- Convert ForumModel.get_threads and ThreadModel.get_posts from returning lists to async generators yielding individual records
- Replace deprecated `_order_by` and `_offset` parameters with `order_by` string syntax in service queries
- Add `get_timestamp` helper and `save` method to BaseModel for direct persistence
- Refactor ForumView endpoints to use `services.forum.get` and `services.thread.get` instead of `find_one`
- Inject request reference into app context via `setattr(self, "request", request)` in view handlers
- Restructure forum HTML template to extend app layout with breadcrumb navigation and dark theme styling
2025-07-12 18:58:19 +00:00
retoor b6240803ab feat: add uuid generation and public notify method to BaseForumService, fix WebSocket handler method name
- Add `generate_uid` method using uuid4 to BaseForumService
- Expose public `notify` method for external event dispatching
- Rename `websocket_handler` to `get` in ForumWebSocketView for proper routing
- Fix WebSocket ID generation to use forum service instance instead of generic services
2025-07-12 01:01:39 +00:00
retoor 91249ff2a1 feat: integrate forum sub-application with models, mappers, services, and WebSocket support
Add complete forum feature including ForumApplication sub-app mounted on parent, new ForumModel/ThreadModel/PostModel/PostLikeModel entities, corresponding mappers and services, event notification dispatch system, and WebSocket endpoint for real-time updates. Refactor service registry to use dynamic registration pattern.
2025-07-12 00:41:57 +00:00
retoor 9493c63396 feat: add PROPGET, PROPSET, PROPDEL routes and property file management to WebDAV handler
Implement three new WebDAV property routes (PROPGET, PROPSET, PROPDEL) alongside property file lifecycle management: delete properties on file removal and move properties on file rename via shutil.
2025-07-10 01:25:40 +00:00
retoor ae6ae150fc fix: remove Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers from CORS middleware 2025-07-08 21:54:28 +00:00
retoor 879148bc2c feat: add Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers to CORS middleware
Add `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: credentialless` headers to the `cors_middleware` response in `src/snek/system/middleware.py`, with a commented-out alternative for `require-corp` to support cross-origin isolation configuration.
2025-07-08 21:35:31 +00:00
retoor 27bca9c295 feat: add time_cache decorator to block_code method and import time_cache
- Import time_cache alongside existing time_cache_async from app.cache
- Apply @time_cache with 60-minute timeout to block_code method in MarkdownRenderer
- Fix minor whitespace formatting issues in markdown.py
2025-07-04 08:38:08 +00:00
retoor f2c67c02d0 fix: remove async semaphore and executor wrapping from BaseMapper execute method
The synchronous _execute call replaces the previous async pattern that used a semaphore
and run_in_executor, simplifying the execution path and removing unnecessary async overhead
for database operations that are already synchronous in nature.
2025-07-04 07:32:03 +00:00
retoor 9f578f1534 refactor: move semaphore to class level and simplify run_in_executor retry logic
The semaphore is now a class-level attribute shared across all instances, and the retry loop with exponential backoff is removed in favor of a single execution path that always acquires the semaphore. The commit call is conditionally performed only when use_semaphore is True, and the template's live-type attribute is flipped from "false" to "true" to enable live chat functionality.
2025-07-04 07:29:03 +00:00
retoor 1cca195b76 fix: correct variable shadowing and add async/await in service worker push handler
- Renamed shadowed `clients` variable to `matchedClients` in `isClientOpen` function to avoid conflict with global `clients` API
- Changed push event listener to async and added `await` before `isClientOpen` call to properly handle the returned promise
2025-07-04 04:03:53 +00:00
retoor 52f14b7c0f fix: comment out patchConsole call in sandbox StarField initialization 2025-07-04 03:50:54 +00:00
retoor 3fe014c9e8 fix: suppress push notification display when client window is already focused 2025-07-04 03:40:19 +00:00
retoor bd643b63e6 fix: disable live-type attribute on chat-input component in web template 2025-07-04 03:16:56 +00:00
retoor 9220bd36f5 fix: correct typo in UserService.search method from kwarggs to kwargs 2025-07-01 08:43:15 +00:00
retoor 763fd9aabe fix: replace punctuated text assignment with space in STTButton typing simulation 2025-06-29 19:13:30 +00:00
retoor 0e6b01a468 fix: replace empty string with space in STTButton simulateTypingWithEvents call
The change modifies the simulateTypingWithEvents call in the STTButton class to pass a single space character instead of an empty string, ensuring the typing simulation triggers proper input event handling for interim speech-to-text results.
2025-06-29 19:10:57 +00:00
retoor 3b659e0db1 fix: restore empty simulateTypingWithEvents call in STTButton interim handler 2025-06-29 19:09:03 +00:00
retoor acdeaaa980 fix: replace interim text replacement with direct sendMessage call in STTButton
The diff modifies the speech-to-text button handler in `src/snek/static/stt.js` to change behavior when interim speech recognition results are received. Previously, the code replaced the input element's value with an empty string and then simulated typing events to insert the interim text. The new implementation sets the input element's value directly to the interim text and calls `document.querySelector('chat-input').sendMessage(interim)` to immediately send the recognized speech as a chat message, bypassing the typing simulation entirely. The old typing simulation logic is commented out.
2025-06-29 19:06:27 +00:00
retoor f1d49a285d fix: remove interim text display and set typing delay to zero in STTButton
The diff modifies two key behaviors in the speech-to-text button component. First, the typing simulation delay parameter is changed from 1 to 0 in the `simulateTypingWithEvents` call within the finalize path, eliminating artificial typing delay when inserting punctuated text. Second, the interim speech recognition handling is refactored: instead of displaying interim text in the input field, both contenteditable and regular input elements now clear the previous interim text by setting their value to an empty string, while the commented-out `simulateTypingWithEvents` call for interim text is uncommented and activated to handle interim updates through the typing simulation mechanism instead of direct value assignment.
2025-06-29 19:03:33 +00:00
retoor 4ac19ef558 chore: refactor STTButton event handling and CSS formatting in stt.js 2025-06-29 18:56:44 +00:00
retoor 1ec7ac8327 chore: fix indentation and formatting in STTButton simulateTypingWithEvents method 2025-06-29 18:34:25 +00:00
retoor 4d908acac0 feat: conditionally skip TTS speech when speaker is disabled in web UI
Add a check for the `snek-speaker` element's enabled state before calling `speak()`. When the speaker is disabled, fall back to playing the message sound instead of attempting speech synthesis. This prevents silent failures and ensures consistent audio feedback based on user preference.
2025-06-29 18:16:15 +00:00