Feature Request: Multi-Platform Coding Problems & Code Optimization Output
Context & Scope
- Maintainer / Repository Owner: @TruCoded
- Difficulty: 🟡 Medium (Updates existing parsing tags, mock data, and UI dropdown logic)
📖 Description
We want to expand our AI analysis feature to support multi-platform coding recommendations instead of restricting links strictly to LeetCode. Additionally, the backend and frontend need updates to extract, pass, and render the best-optimized version of the user's code along with its time and space complexities.
Backend Implementation Tasks
ai_service.py
test_mock_ai.py
test_features.py
Frontend Implementation Tasks
index.html (CSS & HTML Markup)
Frontend JavaScript Logic
Acceptance Criteria
- The AI successfully returns links from multiple coding platforms.
- Selecting a platform from the frontend dropdown correctly filters the displayed problem links in real-time.
- The UI perfectly renders a dedicated block displaying the optimized code with its time/space complexity.
- All backend mock and integration tests pass successfully without breaking existing code analysis tools.
Feature Request: Multi-Platform Coding Problems & Code Optimization Output
Context & Scope
📖 Description
We want to expand our AI analysis feature to support multi-platform coding recommendations instead of restricting links strictly to LeetCode. Additionally, the backend and frontend need updates to extract, pass, and render the best-optimized version of the user's code along with its time and space complexities.
Backend Implementation Tasks
ai_service.pyLEETCODE_PROBLEMS_START/LEETCODE_PROBLEMS_ENDtoPLATFORM_PROBLEMS_START/PLATFORM_PROBLEMS_END.get_explain_prompt):Platform | Title | Link.OPTIMIZED_CODE_START/OPTIMIZED_CODE_ENDOPTIMIZED_TIME_COMPLEXITY_START/OPTIMIZED_TIME_COMPLEXITY_ENDOPTIMIZED_SPACE_COMPLEXITY_START/OPTIMIZED_SPACE_COMPLEXITY_ENDanalyze_code): Update the return dictionary keys to extract and return:platform_problems,optimized_code,optimized_time_complexity, andoptimized_space_complexity.test_mock_ai.pyMOCK_EXPLAIN_RESPONSE: Swap out old LeetCode tags for the newPLATFORM_PROBLEMStags.Platform | Title | Linkpattern.test_features.pyplatform_problemsinstead ofleetcode_problems.Frontend Implementation Tasks
index.html(CSS & HTML Markup)#dsa-platform-select. Include smooth transitions for:hoverand:focusstates.#sec-dsawith a flex container housing the section title and the new#dsa-platform-selectdropdown menu.<pre>element to display the code cleanly, alongside functional "Copy" buttons.Frontend JavaScript Logic
currentPlatformProblemsorcachedProblems) to hold the complete parsed array of multi-platform problems.#dsa-platform-selectto filter and re-render only the problems matching the selected platform (or show all if default).optimized_code,optimized_time_complexity, andoptimized_space_complexityvalues and inject them into the DOM.Acceptance Criteria