Welcome to the weekly recap for the careerpolitics/careerpolitics-platform repository! Over the last 7 days, the project saw 8 merged pull requests and 19 commits. This week brings exciting new capabilities for community managers, a complete overhaul of organization pages, and essential backend optimizations.
🤖 AI Bots & Community Automation
Administrators now have much more flexibility when managing their communities. We rolled out a highly anticipated feature that enables admin-managed community bots and automations without requiring a dedicated subforum setup.
Enable admin-managed community bots and automations without subforem
#81
- Allow site admins to create and manage community bots and scheduled automations for the main community (no subforem) from the admin UI so hosts that only use the main community can create bots and schedule automations.
- Add top-level admin routes for
community_botswith nestedscheduled_automationsso bot management is available at/admin/customization/community_bots/...(inconfig/routes/admin.rb). - Update controllers to support both subforem-scoped and main-community flows by inferring context, centralizing scope/path helpers, and updating redirects (
Admin::CommunityBotsController,Admin::ScheduledAutomationsController). - Make service/model/policy changes so bots may be created without a subforem by allowing
subforem_id: nilinCommunityBots::CreateBotand falling back toSettings::General.app_domainfor email generation, addUser.community_bots_for_main_communityscope, and guard deletion/authorization whenonboarding_subforem_idis blank (CommunityBots::DeleteBot,CommunityBotPolicy,Usermodel). - Update admin views so links, labels and form targets work for both subforem and main-community contexts, and add request specs to cover the new top-level routes (
spec/requests/admin/community_bots_spec.rbandspec/requests/admin/scheduled_automations_controller_spec.rb).
- Added request specs that exercise top-level
admin_community_botsandadmin_community_bot_scheduled_automationsflows and assert creation, deletion, redirects and automation behavior (spec/requests/admin/community_bots_spec.rbandspec/requests/admin/scheduled_automations_controller_spec.rb). - Attempted to run the new specs with
bundle exec rspec spec/requests/admin/community_bots_spec.rb spec/requests/admin/scheduled_automations_controller_spec.rbandbin/rspec ..., but test execution failed in this environment due to missingbundle/Ruby runtime, so automated tests were not executed here. - Views/routes/controllers were reviewed and smoke-checked in the patch; CI should run the added request specs in a Ruby-enabled environment to confirm full behavior.
Building directly on this foundation, we introduced AI post generation into the platform's scheduled automations. This allows community bots to automatically generate and publish fresh content to keep user engagement high.
Add community bot AI post generation to scheduled automations
#82
- Enable community bots to generate context-driven posts via scheduled automations using the AI subsystem.
- Keep the change focused and reusable by adding a dedicated AI service and wiring it into the existing
ScheduledAutomations::Executorflow for draft/publish actions.
- Added a new AI service
Ai::CommunityBotPostCreatorthat acceptsai_contextand optionaladditional_instructionsand returns a parsedPostResultwithtitleandbody. - Extended
ScheduledAutomations::Executorto supportservice_name: "community_bot_post_creator"and addedcall_community_bot_post_creator_servicewhich validatesaction_config["ai_context"]and uses the new AI service. - Updated admin scheduled automation forms (
app/views/admin/scheduled_automations/new.html.erbandedit.html.erb) to expose the new service option and add anAI Contextfield foraction_config["ai_context"]. - Added regression specs:
spec/services/ai/community_bot_post_creator_spec.rband extendedspec/services/scheduled_automations/executor_spec.rbto cover the new service integration and error handling. - Note: new UI strings were added for the service and form labels; localization entries in
config/localeswere not included and should be added to satisfy i18n requirements.
- Added RSpec tests for the new service (
spec/services/ai/community_bot_post_creator_spec.rb) and executor integration (spec/services/scheduled_automations/executor_spec.rb). - Attempted to run
bundle exec rspec spec/services/ai/community_bot_post_creator_spec.rb spec/services/scheduled_automations/executor_spec.rb, but the command failed in this environment with/bin/bash: line 1: bundle: command not found; tests should pass locally or in CI wherebundle/gems are available.
📈 Monetization Enhancements
We introduced new functionality to support ad revenue generation. Administrators can now easily add and configure Google AdSense account details directly within the platform.
FEAT: Add google adsense account details
#79
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
- Related Issue #
- Closes #
Please replace this line with instructions on how to test your changes, a note on the devices and browsers this has been tested on, as well as any relevant images for UI changes.
If your PR includes UI changes, please utilize this checklist:
- [ ] Semantic HTML implemented?
- [ ] Keyboard operability supported?
- [ ] Checked with axe DevTools and addressed
CriticalandSeriousissues? - [ ] Color contrast tested?
For more info, check out the Forem Accessibility Docs.
We encourage you to keep the code coverage percentage at 80% and above.
- [ ] Yes
- [ ] No, and this is why: please replace this line with details on why tests have not been included
- [ ] I need help with writing tests
🏢 Organization Pages Revamp
Organization profiles received a massive overhaul this week. The updated organization pages now include a fully functional README editor, support for liquid tags, integrated social links, an updated header call-to-action, and a completely redesigned settings interface.
🏗 Architecture & Backend Performance
The team tackled several architectural improvements to keep the application running smoothly at scale:
- Split response payloads into separate, dedicated endpoints for each distinct response type.
- Implemented a cleanup job to automatically delete old user notifications before they build up.
- Adjusted the notification cleanup retention window from 3 months to 85 days.
- Patched a notification cleanup issue that was causing database over-indexing.
- Updated concurrent index files to ensure more reliable deployment pipelines.
💅 UI Polishes & Routine Maintenance
In addition to major feature work, we merged several upstream updates and deployed a handful of front-end fixes to polish the user experience:
- Fixed an issue where the mobile footer and billboard were being cut off by the fixed reaction bar.
- Corrected styling mismatches within liquid tags.
- Fixed maximum width constraints on the subscription icon image.
- Added missing JavaScript build steps to the Containerfile for smoother environment setups.
- Successfully merged multiple upstream patches to keep the core codebase synchronized.
Top comments (0)