feat: issue #32 social media captions generator#37
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
OxBot Review
This PR introduces a social media caption generator supporting multiple platforms with OCR and hashtag features, but it suffers from a fundamental architectural mismatch: it presents itself as a standalone community project yet modifies core Tier 1 application code and places files in the shared services directory rather than under projects/. The implementation introduces hardcoded tool-specific logic into the generic tool execution page, duplicates API handling by bypassing existing hooks, and strips critical prompt logic from the registry definition—rendering the tool non-functional. On the Python side, the service makes expensive unbounded LLM calls, lacks input validation and timeouts, and ships an incomplete requirements file. While the concept and helper utilities are solid, the PR requires significant restructuring to align with repository conventions and restore maintainability.
Notes
- Structural mismatch: Community projects must live under projects/ and must not modify core Tier 1 registry files or the shared tool execution page.
- The generic tool execution page should remain tool-agnostic; caption-specific UI, API handling, and modals must be extracted into isolated components or driven by configuration rather than inline conditionals.
- The caption-generator registry definition has been gutted (empty prompts, removed inputs), which will break the tool for all users if merged into the core app.
- The Python service requirements are insufficient for a FastAPI deployment and the project directory placement contradicts the submission checklist.
- Resource efficiency and reliability concerns span the Python implementation: unbounded retry loops with up to 9 LLM calls, missing timeouts, and fragile platform normalization need hardening.
- Cross-file consistency is lacking between the frontend hook expectations, the registry definition, and the Python service interface (e.g., length_type handling, model selection).
Automated review by OxBot
| return <ToolPageContent toolId={tool.id} />; | ||
| } | ||
|
|
||
| function VariationCopyButton({ text }: { text: string }) { |
There was a problem hiding this comment.
Suggestion: navigator.clipboard.writeText can throw if the user denies clipboard permission or if the context is insecure. Wrap this in a try-catch and provide user feedback on failure.
|
|
||
| function VariationCopyButton({ text }: { text: string }) { | ||
| const [copied, setCopied] = useState(false); | ||
| const handleCopy = useCallback(async () => { |
There was a problem hiding this comment.
Bug: setTimeout updates state after 2 seconds but is never cleaned up. If the component unmounts in that window, React will attempt to set state on an unmounted component. Use a ref or useEffect cleanup to clear the timeout.
| @@ -117,6 +310,13 @@ function ToolPageContent({ toolId }: { toolId: string }) { | |||
| config={input} | |||
| value={fields[input.key] || ""} | |||
There was a problem hiding this comment.
Bug: This line appears to be invalid syntax (const custom[REDACTED].getItem(...)). It looks like an assignment was redacted or mangled. It should likely read const customApiKey = localStorage.getItem("oxloApiKey"); or similar.
| : {})} | ||
| /> | ||
| ))} | ||
|
|
There was a problem hiding this comment.
Bug: The response status is not checked before calling response.json(). If the server returns a non-2xx status (e.g., 500 or 404), this may throw or parse an error HTML page. Add if (!response.ok) throw new Error(...) after the fetch.
| : {})} | ||
| /> | ||
| ))} | ||
|
|
There was a problem hiding this comment.
Bug: doExecute sets captionResult directly and then updates result state, which triggers the useEffect at line 259 to re-parse and overwrite captionResult. The effect uses a different fallback for lengthType (data.metadata?.length_type vs || lengthType), causing a potential state desync. Consolidate parsing into a single source of truth.
…nt and result components Replaces isCaptionGenerator boolean with ToolDefinition config: - attachable in InputFieldConfig drives inline image attachment - ResultComponent renders tool-specific results (variations tabs) - requireLengthSelection triggers length-selector modal Extracts CaptionResultDisplay to its own component file.
ms-shashank
left a comment
There was a problem hiding this comment.
LGTM!, Once i will merge your branch and test it on my side and then I will merge it.
Oxtools Submission
Project name: Social Media Captions #32
Contributor: @aalok-p
Project demo: social media captions
What does this tool do?
Generate platform-optimized captions with hashtag suggestions for YouTube, YouTube Shorts, TikTok, Instagram, LinkedIn, Reddit, and X.
Submission checklist
Check every box before requesting a review. Unchecked items will result in the PR being sent back.
Structure
projects/[my-project-name]/Required files
Dockerfileis present anddocker build .succeedsdocker-compose.ymlis present anddocker compose upstarts the appoxlo-manifest.jsonis present and all fields are filled in.env.examplelists every environment variable the project needs (with empty values)README.mdis present with setup instructions a reviewer can follow exactlySecurity
.envfile is not included in this PRgit grep -i "api_key"and found no leaksOxlo API
OXLO_API_KEYenvironment variableFor maintainers
docker build .succeeded locallydocker compose upran successfully and app is reachable