Commit Graph
100 Commits
Author SHA1 Message Date
retoor d9a0103924 chore: replace lru_cache with time_cache for get_url_content to auto-expire after 1 hour
The decorator on `get_url_content` in `src/snek/system/template.py` was changed from `@lru_cache(maxsize=128)` to `@time_cache(timeout=60*60)`, and a new import `from app.cache import time_cache` was added. This ensures cached URL content expires after 3600 seconds instead of persisting indefinitely up to a fixed cache size.
2025-05-31 11:52:04 +00:00
retoor eada404335 feat: add user state tracking fields to ChatInputComponent
Initialize users array, textarea reference, _value, lastUpdateEvent, previousValue, lastChange, and changed properties in class body before constructor, and remove redundant _value initialization from constructor.
2025-05-30 17:32:18 +00:00
retoor b9799a1a33 fix: increase default live-type interval from 3 to 6 seconds in chat-input.js 2025-05-29 00:42:31 +00:00
retoor ce2e12c78c feat: add hidden auto-completions and stars_render RPC for admin commands
Introduce a `hiddenCompletions` property on ChatInputComponent to support privileged slash commands like `/starsRender`, merged with existing auto-completions via `allAutoCompletions`. Modify `resolveAutoComplete` to match only the first word of input, enabling multi-word command arguments. Update the Enter key handler to invoke the hidden completion handler directly instead of setting the textarea value. Add a `stars_render` RPC method that broadcasts a `stars_render` WebSocket event to all online users in a channel, and a corresponding client-side listener that renders the message as a rainbow word on the star field with a delayed shuffle. Increase the deployment notification delay from 10 to 15 seconds to accommodate the new render sequence.
2025-05-28 19:49:30 +00:00
retoor 5fbecdbabb feat: add 'r' key shortcut to focus last reply link when chat input is inactive 2025-05-28 11:40:12 +00:00
retoor 604f18205e feat: add 'i' key shortcut to focus chat input when not active
Add keyboard event handler that intercepts the 'i' key press and focuses the chat input field, but only when the input field is not already active. This provides a quick keyboard shortcut for users to start typing without clicking the input area.
2025-05-28 11:36:43 +00:00
retoor 4cc732dd33 fix: guard message sound playback with is_final flag to prevent duplicate audio on cross-typing events 2025-05-28 10:31:17 +00:00
retoor d39b3de497 fix: restructure channel-message handler to remove is_final guard and flatten notification logic 2025-05-28 10:29:01 +00:00
retoor 4e5c9b0bd8 feat: enable live typing by default and add debug mode for socket events
- Set `live-type="true"` on chat-input element in web.html template
- Move `finalizeMessage` call from Enter key handler to `updateMessage` method in chat-input.js
- Add `_debug` flag toggling in App class with debug method and socket debug logging
- Change socket event listener from "event" to "data" with conditional debug output
- Fix channel_uid reference in chat.py broadcast call
- Add scroll-to-bottom behavior after message text update in message-list.js
- Remove console.info statements from message-list.js scroll methods
- Add null check for message in finalize_message RPC handler and return boolean
2025-05-28 09:38:16 +00:00
retoor e8055422c4 fix: create parent directories recursively for host key path
The `.ssh` directory may not exist when the server starts, causing a `FileNotFoundError` because `mkdir` without `parents=True` fails if intermediate directories are missing. Added `parents=True` to ensure the full path `drive/.ssh/` is created recursively.
2025-05-28 08:40:05 +00:00
retoor bdc8bb43c5 feat: add is_final flag to channel messages and implement message finalization flow
Add `is_final` boolean field to ChannelMessageModel with default true, extend ChannelMessageService.create to accept and store the flag, implement ChatService.finalize method that marks a message as final and broadcasts its complete data, and update RPCView with finalize_message endpoint that validates ownership before finalizing. Modify chat-input.js to pass `is_final` parameter based on live typing state and trigger finalization on Enter key press.
2025-05-27 21:14:06 +00:00
retoor a0b0b19034 fix: assign sorted result back to variable in get_recent_users
The original code called sorted() without assignment, leaving the results list unsorted. This fix assigns the sorted list back to the results variable, ensuring the returned list is correctly ordered by user nick.
2025-05-27 20:22:32 +00:00
retoor c905ffea6a feat: filter online users to only those active in last 3 minutes and sort by nick
The `get_recent_users` query in `channel.py` now includes a `WHERE` clause filtering `user.last_ping` to within the last 3 minutes, replacing the previous unfiltered `get_online_users` call. The `rpc.py` handler removes manual deletion of sensitive fields (`email`, `password`, `deleted_at`, `updated_at`) and adds sorting of results by the `nick` key.
2025-05-27 20:16:41 +00:00
retoor e8b6060392 feat: remove hardcoded black backgrounds from CSS and add z-index to star animation
Remove all explicit `background-color: #000000` declarations from base.css across header, sidebar, chat-header, chat-input, input fields, footer, and main content areas. Add `z-index: -1` to the star pseudo-element in sandbox.css to ensure stars render behind other page content without interfering with layout.
2025-05-27 12:28:07 +00:00
retoor 08e7c1cd59 feat: add get_recent_users endpoint and update mention regex to include hyphens
Implement a new `get_recent_users` RPC method that returns the 30 most recently active channel members ordered by `last_ping`, backed by a new `ChannelService.get_recent_users` query joining `channel_member` with `user` table. Update the chat input component to call `getRecentUsers` instead of `getUsers` on initialization, and extend the mention extraction regex to support hyphens in usernames (`@([a-zA-Z0-9_-]+)`). Remove a debug `console.warn` call from the mention distance calculation logic.
2025-05-27 12:03:01 +00:00
retoor 09978ac2d3 fix: rename isSubsequence parameters from input/array to s/t for clarity 2025-05-27 10:33:04 +00:00
retoor 1d25e03f1a fix: correct isSubsequence logic to use single string comparison instead of array iteration 2025-05-27 10:30:42 +00:00
retoor e412ea2655 fix: change console.info to console.warn and remove debug logs in mention matching 2025-05-27 10:21:40 +00:00
retoor aea5d08695 fix: adjust mention matching distance penalty and move debug log outside loop 2025-05-27 10:16:47 +00:00
retoor 6a62eef9f6 fix: increase penalty for non-subsequence mention matches in chat input
The levenshtein distance penalty for mentions that are not a subsequence of the author name was increased from 1 to 10, making non-subsequence matches significantly less likely to be selected as the closest author. Additionally, the console.info logging was moved outside the minDistance update block to log the distance for every mention comparison, not just when a new closest author is found.
2025-05-27 10:14:02 +00:00
retoor dd4e79cc88 fix: add console.info logging for mention matching debug in chat input 2025-05-27 10:12:03 +00:00
retoor b3074b26fd fix: adjust levenshtein distance variable declaration from const to let in autocomplete
The change modifies the `distance` variable declaration inside the `ChatInputComponent` autocomplete logic from `const` to `let`, enabling reassignment when the mention is not a subsequence of the author name. This ensures the distance penalty is correctly applied during user mention filtering.
2025-05-27 10:10:26 +00:00
retoor 763688be5f fix: correct method name from isSubSequence to isSubsequence in mention matching 2025-05-27 10:08:53 +00:00
retoor d5a4d44480 fix: add subsequence check to improve mention matching accuracy in chat input
The levenshtein distance calculation for author mentions now includes a subsequence check to penalize matches where the mention text is not a subsequence of the author name. This prevents false positive matches where characters are present but in incorrect order, improving the accuracy of author mention suggestions in the chat input component.
2025-05-27 10:06:35 +00:00
retoor ee1af97e26 fix: replace mention placeholders with author names before sending chat message 2025-05-27 09:45:23 +00:00
retoor 113b189d88 refactor: remove unused lastMessage variable and query from web template
The diff removes the `lastMessage` variable declaration and its associated DOM query (`messagesContainer.querySelector(".message:last-child")`) from two locations in the web.html template: the channel-message event handler and the updateLayout function. This variable was previously assigned but never referenced elsewhere in the code, making it dead code that can be safely eliminated to reduce clutter and improve maintainability.
2025-05-27 09:03:25 +00:00
retoor d545be93d5 feat: switch user loading to async promise in chat-input component
The user fetch in chat-input.js now uses a non-blocking `.then()` callback
instead of `await`, allowing the component to render without waiting for
the RPC call to resolve.
2025-05-27 08:57:18 +00:00
retoor cc5b28ed95 fix: fix variable name from content to context in channel message save method 2025-05-27 08:50:09 +00:00
retoor 9c5a92efe2 fix: replace global isElementVisible with MessageList method for scroll detection
Move the isElementVisible utility into the MessageList class as a method and add a new isScrolledToBottom method that checks visibility of the .message-list-bottom element. Update the channel-message event handler to call messagesContainer.isScrolledToBottom() instead of the removed global function, ensuring scroll-to-bottom behavior is correctly determined after new messages arrive.
2025-05-27 08:43:44 +00:00
retoor ebe16175db feat: auto-add non-private channel membership on missing member in WebView
When a channel member is not found for the current user, automatically create a new membership record with default permissions if the channel is not private, instead of immediately returning a 404 error. This ensures users are properly joined to public channels they access.
2025-05-27 08:32:09 +00:00
retoor 340ead63b9 refactor: extract image click-to-zoom logic into dedicated function in web.html
The inline click handler for image zoom overlay creation and removal was moved from the event listener registration block into a standalone function, improving code modularity and reusability.
2025-05-27 08:31:36 +00:00
retoor fe9ae0380e refactor: add avatar-img class to img element in message template for consistent styling 2025-05-27 08:31:30 +00:00
retoor 7ef23cffaa feat: add image click-to-expand overlay in MessageList connectedCallback
Implement a fullscreen overlay for image clicks in the chat message list, excluding avatar images. The overlay displays the clicked image without query parameters, centered on a dark background, and removes itself on click.
2025-05-27 08:30:58 +00:00
retoor e45bed1000 feat: enrich message render context with user info fields
Extend the `save` method in `ChannelMessageService` to fetch the associated user record via `user_uid` and merge user fields (`uid`, `username`, `nick`, `color`) into the template rendering context, replacing the previous direct use of `model.record`.
2025-05-27 08:30:31 +00:00
retoor 9da3740c4e feat: add AvatarView web endpoint for generating animal avatars with multiavatar library
- Create new `avatar_animal_view.py` module with `AvatarView` class inheriting from `BaseView`
- Implement `get` method that accepts a `uid` parameter from request match info
- Integrate `multiavatar` library for avatar generation alongside existing `generate_avatar_with_options` helper
- Set `login_required = False` to allow public access to avatar generation endpoint
- Initialize `self.avatars` dictionary in constructor for potential caching of generated avatars
2025-05-27 08:29:44 +00:00
retoor f135c94d2a feat: constrain main content area to viewport height with overflow hidden
The change adds inline style `max-height: 100vh; overflow-y: none` to the `<main>` element in `src/snek/templates/app.html`, preventing the main content area from exceeding the viewport height and disabling vertical scrolling within it. This ensures the layout stays within the visible screen bounds, likely to support a fixed sidebar or header layout without page-level scroll.
2025-05-25 18:50:32 +00:00
retoor fb30c819b4 feat: restore avatar caching with redis and unique uid fallback in get_animal
- Add redis caching for generated avatars using key prefix "avatar_animal_"
- Handle "unique" uid by generating a random uuid4 to bypass cache
- Remove in-memory avatars dict and _get method's caching logic
- Return cached avatar immediately if found in redis before generating new one
2025-05-25 17:01:28 +00:00
retoor 368d0d3778 fix: restore avatar retrieval by switching type param from path to query
The avatar endpoint was broken after a previous refactor changed the type parameter source from query string to URL path match_info. This commit reverts that change in the `get` method of `AvatarView` class, restoring the original behavior where `type` is read from `self.request.query.get("type")` instead of `self.request.match_info.get("type")`. This fixes the 404 errors and missing avatar images for animal and default avatar types.
2025-05-25 16:55:39 +00:00
retoor af353b0feb fix: restore avatar endpoint by adding type-based routing with animal and default handlers 2025-05-25 16:51:55 +00:00
retoor 54b193e84f feat: add ChannelView route and reorder channel member data fetching
Add new GET route "/c/{channel:.*}" mapped to ChannelView for channel support. Move parent_object retrieval before other_user and last_message lookups in channel member subscription loop to ensure data dependencies are resolved in correct order.
2025-05-25 10:30:43 +00:00
retoor b02527224f feat: add ChannelView with auto-creation and redirect for missing channels
Implement ChannelView handler that resolves channel by name with multiple lookup attempts, creates a new channel if none found using query parameters for visibility flags, assigns creator as moderator, and redirects to the channel's HTML page.
2025-05-25 10:30:26 +00:00
retoor 66854636d3 feat: remove debug console.info calls for key and escPressed in keydown handler 2025-05-24 23:28:42 +00:00
retoor c62e1438eb feat: replace DOM-based author extraction with RPC user list in ChatInputComponent
Refactor getAuthors() to fetch users from app.rpc.getUsers() instead of scanning DOM elements. This improves performance and reliability by using the server-side user list, which includes both username and nick fields. Also add async initialization of this.users in connectedCallback() using the channelUid attribute.
2025-05-24 23:25:43 +00:00
retoor 72097bf7ae fix: enable shift+G shortcut to focus chat input when input is inactive 2025-05-24 13:00:26 +00:00
retoor c374cbddc6 feat: replace escape-g scroll-to-bottom with scroll-to-top and load-extra on double-g
The key handler for the double-press of 'g' now scrolls to the first message and triggers `loadExtra()` instead of scrolling to the last message and focusing the input. The escape key press no longer sets a flag but instead blurs the active element. The shift-G handler now always prevents default and updates layout regardless of input focus, with the focus condition commented out.
2025-05-24 12:45:53 +00:00
retoor 46e9732c0f fix: wrap reply message content in markdown code block in web template
The replyMessage function now encloses the quoted message in triple backticks with a markdown language specifier, ensuring proper rendering of the quoted content in the chat input field.
2025-05-24 12:22:12 +00:00
retoor 69f085e39f feat: refactor web template to cache DOM selectors and throttle refresh handler
Extract repeated DOM queries into module-level constants for chatInputField, messagesContainer, chatArea, channelUid, and username. Replace inline arrow functions in autoCompletions with direct references and a single-line clear implementation. Add a generic throttle utility and apply it to the refresh event listener to prevent rapid reloads on repeated server notifications.
2025-05-24 12:18:38 +00:00
retoor 1995d12ff8 feat: insert new chat messages before message-list-bottom element instead of appending 2025-05-24 10:58:43 +00:00
retoor e53bce9e28 feat: add author mention matching with levenshtein distance in chat-input 2025-05-23 17:50:58 +00:00
retoor 95b675ac36 fix: re-enable forced scroll-to-bottom and add immediate scrollHeight set in MessageList 2025-05-23 13:26:47 +00:00
retoor 34e13e4142 fix: fix typo in scheduled list removal and adjust refresh timing in RPCView.get 2025-05-23 05:07:19 +00:00
retoor 2a831a8a72 fix: correct typo in starField property name and add null initialization in App class 2025-05-23 05:02:45 +00:00
retoor ea7021d4a0 feat: add color parameter to triggerGlow and track scheduled tasks in RPCView
- Extend triggerGlow method in MessageList to accept optional color parameter and call app.startField.glowColor(color)
- Add _scheduled list to RPCView session class to track pending scheduled calls
- Refactor _schedule method to use self.user_uid instead of passed uid parameter and manage _scheduled list
- Add scheduled list tracking in RPCView.get() and conditionally skip deployment refresh if scheduled tasks exist
2025-05-23 05:00:28 +00:00
retoor 2ea459eb8e feat: add uptime tracking, starfield day/night theme, and RPC session management
- Add `time_start` and `uptime` property to Application class for server uptime tracking
- Implement starfield CSS with day/night theme toggle and special star effects
- Add `reconnecting` event emission in Socket class and corresponding UI notification
- Introduce RPC session management with `_session_ensure`, `session_get`, and `session_set` methods
- Add `_schedule` helper in RPCView for delayed message delivery to users
- Wire up `refresh`, `deployed`, and `starfield.render_word` WebSocket events in web template
2025-05-23 04:48:18 +00:00
retoor ad05e19c19 fix: switch user fetch to async pattern and add delayed focus in chat input
- Changed `connectedCallback` to set `this.user = null` immediately and fetch user asynchronously via `.then()` instead of blocking with `await`
- Added `setTimeout` with 1000ms delay to call `this.focus()` after message send handler registration
- Updated `scrollToBottom` in message-list to use `scrollIntoView` on `.message-list-bottom` element with a 200ms retry timeout instead of direct `scrollTop` assignment
2025-05-23 01:01:20 +00:00
retoor eea2a03f36 fix: restore direct scrollTop assignment in MessageList scrollToBottom
The scrollToBottom method previously used scrollIntoView on the
message-list-bottom element, which caused inconsistent scrolling behavior
when new messages were added. Reverting to the direct scrollTop assignment
ensures the container scrolls reliably to the full content height.
2025-05-23 00:39:48 +00:00
retoor 8242d0db10 fix: pass color parameter to triggerGlow and fix scrollToBottom method in MessageList 2025-05-22 23:17:34 +00:00
retoor b835ccc2f6 chore: normalize indentation and quote style across static JS modules
Standardize all JavaScript files in src/snek/static/ from 4-space to 2-space indentation and convert single quotes to double quotes for string literals, ensuring consistent formatting across app.js, chat-input.js, chat-window.js, event-handler.js, fancy-button.js, and file-manager.js. Also add new DumbTerminal custom element class in dumb-term.js.
2025-05-22 22:44:18 +00:00
retoor a567881677 feat: add animal-themed avatar generator with caching and star position logic
Implement a new avatar generation system using the AnimalAvatarGenerator class that produces SVG animal avatars based on query parameters. Add an in-memory cache in AvatarView to store generated avatars per user ID, and introduce a getStarPosition helper in sandbox.html that classifies star positions into cardinal directions and center/edge regions.
2025-05-20 02:20:10 +00:00
retoor fcc7ba9587 fix: reduce glow intensity and expose star color update function
The glowCSSVariable lighten factor was reduced from 80 to 10 to produce a more subtle visual effect. The updateStarColorDelayed function is now exposed on the app object as app.updateStarColor for external access. The unused StarField class and its instantiation have been commented out to clean up dead code.
2025-05-18 23:35:34 +00:00
retoor cfbb28a562 fix: increase glow color lightening from 40 to 80 in sandbox CSS variable function 2025-05-18 23:28:22 +00:00
retoor 4a2ac81809 feat: add StarField class with configurable twinkling stars to sandbox page
Introduce a new StarField JavaScript class that generates animated star elements with customizable count, size range, speed, and color. Instantiate it on document body with default settings to enhance the sandbox visual experience.
2025-05-18 23:23:12 +00:00
retoor 01dbace535 fix: increase glow color lightening from 20 to 40 in sandbox CSS variable animation 2025-05-18 23:13:18 +00:00
retoor 4fcdcc1745 feat: add container settings views and enhance typing indicator with user color
Add four new container management views (index, create, update, delete) with corresponding router entries in the application. Refactor sandbox star field to use ES modules and CSS custom properties for dynamic star color. Extend the typing indicator RPC method to accept an optional color parameter, falling back to the user's stored color, and include it in the broadcast payload. Update the chat input component to fetch the current user asynchronously and pass their color when triggering typing events.
2025-05-18 23:07:11 +00:00
retoor d18bb8aa39 feat: add Container model, mapper, service, and CRUD templates for container management
Introduce a new Container entity with fields for id, name, status, resources, user_uid, path, and readonly. Register ContainerMapper in the mapper registry, Container model in the model registry, and ContainerService in the service registry. Implement create, get, update, and delete methods in the service layer. Add Jinja2 templates for listing, creating, updating, and deleting containers under settings/containers/, including form styling and Font Awesome icons.
2025-05-18 17:47:15 +00:00
retoor 88530346c5 feat: add starfield background animation and link sandbox.css to index.html
- Change default theme from dark2 to light1 in gitlog.py
- Update server port from 8000 to 8481
- Remove background-color styling from diff line highlights in gitlog.py
- Switch index.html body background from #111 to #000
- Add link to /static/sandbox.css stylesheet
- Inject JavaScript generating 200 animated star elements with randomized position, size, and flicker timing
2025-05-18 15:48:22 +00:00
retoor 262f5e0461 feat: add twinkling star background with CSS animation and JS generation
Add a new sandbox.css stylesheet defining absolute-positioned star elements with a twinkle keyframe animation, and a sandbox.html template that generates 200 randomized stars (position, size, animation duration/delay) via JavaScript. Include both files in app.html via link and include directive.
2025-05-17 15:46:59 +00:00
retoor 7f0aea4afd feat: replace inline chat-input with custom element and migrate autocomplete logic
Refactor the chat input area in web.html to use the new ChatInputElement custom component instead of inline HTML. Move autocomplete handler from a function-based getInputField() to directly attaching to the chat-input element's autoCompletions property. Remove the legacy initInputField function and its associated keydown/input event listeners, consolidating all input behavior into the component. Add the chat-input.js module script to app.html to ensure the custom element is registered globally.
2025-05-16 22:54:15 +00:00
retoor 0a0f817a07 feat: replace bare-bones HTML with full landing page featuring hero, grid, and dark theme
Complete redesign of the index.html template from a minimal stub to a polished landing page. Adds a gradient hero section with call-to-action buttons, a responsive feature card grid, and a cohesive dark color scheme with hover effects. Introduces CSS reset, container layout, and link styling for a modern, production-ready appearance.
2025-05-16 22:53:27 +00:00
retoor 3589ad301a feat: add enabled flag to Cache class with early returns in get/set/delete
Add an `enabled` attribute initialized to `False` in the Cache constructor, and guard clauses at the start of `get`, `set`, and `delete` methods that return immediately when the cache is disabled, allowing runtime toggling of caching behavior without modifying callers.
2025-05-15 23:38:42 +00:00
retoor d803e87777 fix: increase last_ping threshold from 20 to 180 seconds in channel presence check
The threshold for considering a user as recently active in the channel presence
yield logic was raised from 20 seconds to 180 seconds, reducing the frequency
of presence updates and accommodating longer intervals between user pings.
2025-05-15 22:41:40 +00:00
retoor 6a3364d305 feat: batch file uploads into single message and fix attachment image format handling 2025-05-15 22:32:54 +00:00
retoor 50690d962e feat: add user availability service to periodically update online user timestamps
- Introduce `start_user_availability_service` method in Application class that creates an asyncio task for periodic user availability updates
- Implement `user_availability_service` coroutine in SocketService that iterates connected sockets every 60 seconds, updating each user's `last_ping` timestamp and persisting changes via the user service
- Add logging for socket addition and user availability service lifecycle events
- Reorder startup hooks to ensure user availability service starts before SSH server and database preparation
2025-05-15 22:04:19 +00:00
retoor 9c12bfead3 feat: add /live command entry to help dialog command list
Insert a new command object for "/live" with description "Toggle live typing mode" into the commands array in the help dialog template, placed after the existing "/img-gen" entry.
2025-05-15 21:30:23 +00:00
retoor 3a6da92c86 feat: replace inline online dialog with reusable dialog components and add help modal
Extract the online users dialog from `online.html` into a dedicated `dialog_online.html` template, create a new `dialog_help.html` template with a custom `help-command-list` web component, and add global `<dialog>` styling in `base.css` with centered positioning, backdrop blur, and fade/scale animations. Update `web.html` to include both dialog templates, wire the `/help` autocomplete command to `showHelp()`, and rename the `/online` handler from `showOnlineUsers()` to `showOnline()`.
2025-05-15 21:16:28 +00:00
retoor af7be99ab9 feat: add message edit time limit and broadcast full record on update
- Add `get_seconds_since_last_update` method to `ChannelMessageModel` for age checking
- Reject edits on messages older than 3 seconds in `updateMessageText` RPC handler
- Broadcast full message record (including html) instead of just text in socket event
- Update frontend `updateMessageText` to parse and set innerHTML from received html field
- Fix CSS selector for chat message images to use descendant combinator
- Add 3-second auto-clear timeout for liveType input field
- Prevent liveType submission on trailing newline or space
- Hide empty messages in channel-message event by setting display none
2025-05-15 17:32:40 +00:00
retoor 10b0c3448a feat: add MessageList and UserList web components with load balancer and sync module
Implement MessageList custom element with real-time message text updates and typing glow animation, add UserList component with relative time formatting, introduce LoadBalancer class for backend process management, create DatasetWebSocketView for key-value sync over WebSocket, override save method in ChannelMessageService to render HTML templates, and return channel_message object from ChatService instead of boolean.
2025-05-15 11:18:53 +00:00
retoor 6250a7a09c feat: url-encode attachment relative_url in upload response
Add urllib.parse import and encode the relative_url field of each attachment record before returning it in the JSON response for file uploads, ensuring special characters in URLs are properly escaped for client consumption.
2025-05-13 21:33:24 +00:00
retoor e15b70be41 fix: append height parameter to image src in enrich_image_rendering
Add `&height=240` query parameter alongside existing `?width=240` when
processing image source URLs in the BeautifulSoup-based template rendering
function, ensuring both dimensions are explicitly set for responsive image
generation.
2025-05-13 20:54:21 +00:00
retoor 976ff9b54b feat: add pointer cursor to chat message images for click interaction indication 2025-05-13 19:25:49 +00:00
retoor 8ff32f9293 fix: reduce image rendering width to 240px and strip query params on fullscreen 2025-05-13 18:35:42 +00:00
retoor f66c9132eb fix: remove redundant webp format query param from picture source srcset 2025-05-13 18:30:48 +00:00
retoor b035509471 fix: correct string concatenation for image src attribute in enrich_image_rendering
The previous implementation used `list.append()` on a string object, which is invalid since strings do not have an append method. Changed to use the `+=` operator to properly concatenate the "?width=420" query parameter to the image source URL within the BeautifulSoup HTML processing pipeline.
2025-05-13 18:28:31 +00:00
retoor e635865190 fix: append width query param to img src before building picture template 2025-05-13 18:27:26 +00:00
retoor efaef42287 fix: correct missing concatenation operator in image src attribute template 2025-05-13 18:25:00 +00:00
retoor f7d6e09481 fix: append width=420 query param to img src in enrich_image_rendering
The change modifies the img tag's src attribute within the picture template generated by the enrich_image_rendering function, adding a "?width=420" query parameter to the image URL while leaving the title and alt attributes unchanged. This ensures images rendered through this template are served at a constrained width of 420 pixels.
2025-05-13 18:24:29 +00:00
retoor 3f81cac93e fix: change attachment relative_url format and add overflow scroll to drive container 2025-05-13 18:21:00 +00:00
retoor 0d95dbdb9c feat: add gitlog.jsonl dataset and gitlog.py server with theme support 2025-05-18 14:55:02 +00:00
retoor 8881bc4439 fix: append width query param to image title in embed_image template
The change adds `?width=420` to the title attribute of embedded image tags, ensuring that when images are rendered, the title string includes a width hint for responsive or constrained display behavior. This affects the `embed_image` function in `src/snek/system/template.py` where image elements with extensions like `.jpg`, `.png`, `.gif`, `.webp`, `.heic` are processed.
2025-05-13 18:20:43 +00:00
retoor 549c98d55b feat: add click-to-expand image overlay with dark backdrop in web chat template
Implement a full-screen image preview overlay triggered by clicking any <img> element inside the messages container. The overlay uses a fixed dark background (rgba(0,0,0,0.9)) and centers the image at up to 90% viewport dimensions. Clicking the overlay dismisses it by removing the element from the DOM.
2025-05-13 18:18:47 +00:00
retoor 70b4b420d1 perf: remove per-task timing instrumentation from worker loop in Application
The diff removes the `time.time()` calls and the `print` statement that logged the duration of each task execution inside the worker loop of `Application`. This eliminates unnecessary overhead and console noise from the hot path.
2025-05-13 17:13:50 +00:00
retoor 070d8b2e6a refactor: extract WebSocketClient from serpentarium.py into dedicated system module with dynamic RPC method dispatch 2025-05-13 17:08:18 +00:00
retoor 6b7e53cba7 feat: add serpentarium dataset wrapper with websocket sync and sql schema
Introduce a new research module implementing a custom dataset wrapper with raw WebSocket client connectivity, a SQL schema for chat application tables (users, channels, messages, notifications), and a sync service that propagates database queries between nodes via WebSocket. Includes a performance test harness comparing the wrapper against direct dataset usage.
2025-05-13 16:30:31 +00:00
retoor 2c9efc3626 feat: add database init command, uvloop import, and snode sync service to snek app 2025-05-13 16:32:59 +00:00
retoor 5254593b0d fix: change default SSH port from 2042 to 2242 in Application class 2025-05-11 05:52:58 +00:00
retoor 75c8acc1ef feat: add SSH/SFTP server with sync auth and chroot per-user home folders
Introduce a new SSH server module (snek/sssh.py) that provides SFTP access using asyncssh. The server authenticates users synchronously via the existing password validation logic, chroots each session to the user's dedicated drive directory, and is started as an application startup hook on 0.0.0.0:2042. Refactor security helpers (hash, verify) to expose synchronous variants for use in the SSH authentication flow without async context.
2025-05-11 05:52:22 +00:00
retoor 8cfeed72ea fix: remove hardcoded repo path and user credentials, comment out list endpoint 2025-05-10 19:44:58 +00:00
retoor ad385cb1bd fix: remove debug print of user_uid in channel broadcast loop
Remove a leftover debug print statement that was logging each user_uid
to stdout during channel message broadcasting in SocketService.
2025-05-10 18:40:56 +00:00
retoor 8fc126d45a feat: add channel attachment upload and retrieval with dedicated model, mapper, service, and view 2025-05-10 18:38:32 +00:00
retoor bb56df9183 feat: add typing indicator with glow animation and event broadcasting
Implement real-time typing indicator feature across frontend and backend. Add `set_typing` RPC method in `RPCView` that broadcasts typing events with user details to a fixed channel. Introduce `typeLock`, `typeListener`, and `set_typing` method in `App` class to periodically send typing status. Update `Socket` to emit custom events from incoming data. Add CSS `glow` keyframe animation and apply it to user avatars in `web.html` when `set_typing` event is received.
2025-05-10 13:08:28 +00:00