Open
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
808a46d to
4efba38
Compare
P1 fixes: - Prevent symlink traversal in pathSecurity via realpathSync - Serialize pick/paste with AsyncLock to prevent race conditions - Replace queueMicrotask with 300ms setTimeout for double-tap guard P2 fixes: - Clean up session upload temp dir on shutdown - Use shared encodeBase64 to fix O(n²) string concatenation in web - Scope upload dir validation per session (cross-session isolation) - Preserve non-timeout RPC errors instead of swallowing as "timed out" - Type RPC result instead of any - Fix isSessionMode type guard parameter type - Tighten tool result content type to z.enum(['text', 'image'])
4efba38 to
230f495
Compare
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.
Summary
Add the ability to send images (screenshots, UI mockups, photos) from the Happy mobile and desktop app to AI coding agents. This enables users to leverage Claude Code's vision capabilities directly from the app.
Core Feature: Image Upload Pipeline
Flow:
writeFileto CLI machine's OS temp dir ($TMPDIR/happy/uploads/{sessionId}/)[image: /path/to/file.jpg]referencesWhy this approach: Zero server/protocol changes required. Reuses existing
writeFileRPC (already encrypted), and Claude Code's Read tool already supports image files natively.What's New
expo-image-picker, resize viaexpo-image-manipulatorimageUpload.tsimageUpload.web.ts,MultiTextInput.web.tsximageUpload.shared.tsuseImageUpload— state management for pending images, pick/paste handlersuseImageUpload.tsAgentInput.tsxAgentInput.tsx[image: path]referencessystemPrompt.tsgetUploadDirRPC returns OS temp dir pathregisterCommonHandlers.tsvalidatePath()extended withadditionalAllowedDirsfor temp upload dirpathSecurity.tsapiSession.tstranslations/*.tsBug Fixes & Improvements
crypto.getRandomValuescrash on iOS/Android — Hermes doesn't have Web Crypto API; replaced withgetRandomBytesfromexpo-cryptoencodeBase64()for large buffers (>65KB) that previously crashed on webflexShrinkinstead offlexGrowto prevent text clipping on long file pathsModelModeinto const array with runtime validatorisValidModelMode(), removeas anycastsconsole.logdebug statements from MultiTextInputTechnical Notes
imageUpload.ts(native) /imageUpload.web.ts(web) follows the existingMultiTextInputpattern. Shared logic extracted toimageUpload.shared.tsexpo-image-pickerandexpo-image-manipulatorwere already inpackage.jsonbut unusedTest plan
/compactand/clearcommands ignore pending imagespathSecurity.test.ts)yarn typecheckpasses