Commit Graph
100 Commits
Author SHA1 Message Date
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
retoor 82f1259cfc feat: add DriveApiView and HTML drive page, extract shared repository form template, and update file-manager styling 2025-05-10 13:03:50 +00:00
retoor aeb00226fe feat: add DBService with per-user sqlite database and RPC endpoints for crud operations
Introduce a new DBService that manages per-user SQLite databases stored under each user's home folder using the `dataset` library. The service provides async methods for insert, update, upsert, find, get, delete, and raw query operations. Corresponding RPC handler methods (db_insert, db_update, db_delete, db_get, db_find, db_upsert, db_query) are added to the RPCView class, each requiring an authenticated session via _require_login. The service is registered in the get_services factory and injected into the services dictionary.
2025-05-09 15:37:53 +00:00
retoor 6f638d7f8b feat: add humanize dependency and implement bare repository navigation with branch/commit browsing
Add `humanize` to project dependencies for human-readable file sizes and timestamps. Implement `BareRepoNavigator` class in repository view to support browsing bare git repositories by branch, commit, and path. Update route parameters from `repo_name`/`rel_path` to `repository`/`path` for consistency with other views.
2025-05-09 13:55:51 +00:00
retoor 1ebb54efc4 feat: add file browser custom element and repository view with git tree traversal
Introduce a <file-browser> web component with pagination, breadcrumb navigation, and grid-based file tiles. Implement RepositoryView that serves repository contents by walking the git commit tree, sorting entries by type and name, and rendering them via the repository.html template with folder/file icons and size display.
2025-05-09 12:30:53 +00:00
retoor 292a2651fd chore: minify Python source files by collapsing imports and inlining simple class bodies 2025-05-09 12:19:29 +00:00
retoor 7fbb06fdbf feat: add repository browsing routes, drive availability flag, and user lookup service
- Register RepositoryView and DriveView routes for repository and drive browsing
- Add `is_available` boolean field to DriveItemModel with default True
- Implement `get_by_username` method in UserService for username-based queries
- Comment out repository deletion logic in GitApplication
- Include file-manager.js script and Font Awesome CDN stylesheet in app template
- Fix repository URL paths in settings template to use correct attribute access
- Refactor DriveView with full directory listing and file serving capabilities
- Pass user object to repositories index template for template rendering
2025-05-09 12:08:46 +00:00
retoor b71731bfcf refactor: replace argparse CLI with click commands and add shell subcommand
Migrate the command-line interface from argparse to click, introducing a `cli` group with `serve` and `shell` subcommands. The `serve` command retains port, host, and db_path options with defaults, while the new `shell` command launches an IPython shell with the application context. Update Makefile targets to use the new `.venv/bin/snek` binary and add a `serve` alias for `run`.
2025-05-09 07:56:23 +00:00
retoor 5cb4233138 fix: increase client_max_size to 5GB in Application and GitApplication constructors
The Application class now passes a 5GB client_max_size limit to its parent constructor, while the GitApplication class has its existing limit raised from 100MB to 5GB, enabling support for larger file uploads and repository operations.
2025-05-09 07:18:55 +00:00
retoor 2aae42602e feat: implement basic auth credential parsing and user authentication in check_basic_auth
Replace the stub that always returned a fixed user and path with full HTTP Basic authentication logic. The method now extracts and base64-decodes the Authorization header, splits credentials, authenticates the user via the parent services layer, retrieves the user-specific repository path, and returns the username and path only on successful authentication.
2025-05-09 07:09:33 +00:00
retoor 370a7e43be feat: add uvloop dependency and fix repo name parsing in sgit.py
- Add uvloop to project dependencies in pyproject.toml for async event loop optimization
- Fix repository name extraction by replacing lstrip('git/') with slice [4:] to avoid stripping leading characters incorrectly
- Normalize string quotes from single to double for repo_dir path construction
- Add trailing whitespace to return statement in get_repository_path helper
2025-05-09 06:54:33 +00:00
retoor d8524d1f85 fix: fix typo in delete route and implement repository deletion with filesystem cleanup 2025-05-09 06:24:43 +00:00
retoor f65dc160c0 feat: add GitApplication subapp and repository init with gitpython
Add a new GitApplication subapp mounted at /git with smart HTTP protocol support for repository operations. Include gitpython dependency in pyproject.toml, fix recursive call in RepositoryService.exists by delegating to super(), and change RepositoryService.init to return boolean success instead of printing output. Also modify UserService.get_repository_path to always return a path object without checking existence.
2025-05-09 05:55:08 +00:00
retoor 06da973f3a feat: add repository management with CRUD views, mapper, service, and uvloop integration
Implement full repository management feature including RepositoryModel with user_uid, name, and is_private fields, RepositoryMapper for database persistence, and RepositoryService with exists, init, and create methods that spawn bare git repos via asyncio subprocess. Add four new settings views (index, create, update, delete) with corresponding templates and route registrations in Application. Register repository mapper, model, and service in their respective __init__ factories. Extend UserService with get_repository_path helper. Switch event loop policy to uvloop in __main__.py for improved async performance.
2025-05-09 03:38:29 +00:00