Feature/retirejs#133
Closed
VaridhiJain18 wants to merge 59 commits into
Closed
Conversation
Store the forwarded message ID when adding new messages to the database.
Update the API endpoints in `src/messaging/data.js` to properly add forwarded messages to message objects when returning data to the frontend. Also, update OpenAPI schemas to reflect forwarded message additions.
…riting part into the db, and reading forwarded message from db is also available. Partially modified the front-end.
Added pop up that displays the chats you can forward the current message to, when the user is hovering over a message.
feat(backend): add forwarded messages
Forward Chat Selection Popup
Add the forward button based on the updates from Varidhi.
…bb-spring-26-the-league into dev-forward-message
Update the message view to incorporate a forwarded message view if the forwarded message attribute is populated.
Fix the scope of the forwardMid test to properly call the API.
Add forward messaging feature. Users can now forward an message in the chats from one room to another by clicking a button next to reply.
Fix lint and error message attempt 2
Allow registered users to save custom color theme preferences via the
existing settings API (`PUT /api/v3/users/:uid/settings`). Seven new
fields are stored in the user:{uid}:settings hash:
- `customThemeColor_headerBg` / `customThemeColor_headerText`
- `customThemeColor_bodyBg` / `customThemeColor_bodyText`
- `customThemeColor_linkColor`
- `customThemeColor_buttonBg` / `customThemeColor_buttonText`
Values are validated as 6-digit hex colors (`#RRGGBB`) on save and
HTML-escaped via `validator.escape()` on read to prevent XSS. Empty
strings are accepted to clear a color.
No new routes, controllers, or database keys — the implementation
follows the existing bootswatchSkin pattern in `src/user/settings.js`.
Tests: 4 new cases covering valid save, invalid rejection, empty
values, and XSS sanitization.
Added a custom skin option in the settings and added a color picker.
- Add reactions.js with addReaction, removeReaction, toggleReaction, getReactions, and deleteReactions - Register reactions module in messaging index
Endpoints for message reactions feature. (Issue 2) - GET /:roomId/messages/:mid/reactions - POST /:roomId/messages/:mid/reactions
Issue 3: Include reactions in message payload
Issue 4: Broadcast full reactions array to room on add/remove
Update the CI test workflow to run on dev branches.
Custom Color Theme: Backend Implementation
Update the OpenAPI SettingsObj schema to properly store new custom colortheme parameters.
Custom Skin Color Picker: Frontend Implementation
- Replace 2-field (customPrimaryColor/customSecondaryColor) frontend with the 7-field backend model (customThemeColor_headerBg, headerText, bodyBg, bodyText, linkColor, buttonBg, buttonText) - Add 7 color picker pairs to settings.tpl with reset button - Rewrite applyCustomColors() to map each field to correct CSS targets (body bg/text via root vars, sidebar/brand via selectors) - Update header.tpl FOUC prevention script to use 7-field model - Target harmony theme elements (.sidebar-left, .sidebar-right, .brand-container) instead of non-existent .navbar - Update api.js to pass all 7 fields to client config - Remove unused customPrimaryColor/customSecondaryColor from backend settings.js and OpenAPI schemas - Add translation keys to en-GB/user.json (was only in en-US) - Fix no-bitwise lint warnings in shadeColor helper - Fix indentation in render.js
Custom Color Theme: Full-Stack Implementation (#10)
feat(chat): implement frontend reaction system for chat messages - Add initReactionHandlers to handle reaction button clicks - Integrate emoji-dialog picker for selecting reactions - Implement toggleReaction API call to backend - Add click handler for existing reaction pills (toggle behavior) feat(chat): handle real-time reaction updates via socket event - Add socket listener for event:chats.reaction - Implement onReactionUpdate to dynamically re-render reaction pills - Preserve reaction add button while refreshing reaction list - Re-parse emojis using app.parseAndTranslate
- Render reaction pills with emoji and count - Highlight reactions made by current user - Add reaction-add button for emoji picker integration
- Add chat-reactions layout and pill design - Style emoji and count display - Add active state for user reactions - Add hover interactions for pills and add button - Hide reaction-add button until message hover
Message Reactions Backend
feat(chat): implement frontend reactions system
Message-Reactions: Full-Stack Implementation All CI test cases passed.
Add user documentation covering usage instructions, user testing steps, and automated test locations for the three sprint features: message forwarding, message reactions, and custom color scheme.
Add UserGuide.md for sprint features
Update the Docker Compose file to give NodeBB root user privileges for deploying on the VM.
chore: Grant root privileges to NodeBB Docker service
Add a `vm_deploy.yml` file to set up a GitHub workflow for deploying to the VM.
chore(vm): add vm workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate Retire.js for static vulnerability analysis
Summary
This PR integrates Retire.js into the project on a dedicated testing branch and documents installation, run artifacts, and an assessment of the tool.
1. Evidence of successful installation (trackable file changes)
The following files were added or modified to install and configure Retire.js:
.retireignorenode_modules/,build/,*.min.js) to focus scan on relevant code.package.json"retire": "retire --path . --outputformat text --outputpath retire-results.txt"to run vianpm run retire. Addedretireas a dev dependency.package-lock.jsonNote: Retire.js was installed via
npm install --save-dev retire.2. Artifacts demonstrating successful run
The following artifact shows that Retire.js was run successfully on this repository:
npm run retireshowing the tool successfully scanned the project using its vulnerability database.Summary from the run:
https://raw.githubusercontent.com/RetireJS/retire.js/master/repository/jsrepository-v5.json3. Assessment: pros, cons, and customization
3.1 Customization
A priori (before use):
npm install --save-dev retire. Fully integrated into NPM workflow..retireignoreto excludenode_modules/,build/,coverage/, and*.min.jsto reduce scan time.Over time:
3.2 Strengths (with evidence)
Quantitative:
3.3 Weaknesses (with evidence)
Quantitative:
3.4 Conclusion
Retire.js is an excellent specialized tool for identifying JavaScript libraries with known security vulnerabilities. For this repository, it confirmed that dependencies are currently free of known CVEs, which is a positive security indicator.
While it does not catch application logic bugs (unlike Semgrep), configuration issues, or perform runtime testing (unlike k6), it fills a critical niche in dependency security management. The tool complements rather than replaces other analysis tools.
Recommended follow-up actions:
npm auditfor comprehensive dependency securityTool Overview & Analysis Type
Tool: Retire.js (GitHub)
Type: Static analysis (vulnerability scanner). Checks dependencies against a vulnerability database without executing code.
Description: A scanner detecting JavaScript libraries with known security vulnerabilities by comparing versions against a curated database.
Types of Problems Caught
Customization
.retireignorefile focuses scans on relevant code by excluding build artifacts and node_modules.Development Process Integration
Local Development:
npm run retirebefore commitsCI/CD Pipeline: