Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Nov 22, 2025

Reverts #9491


Important

Reverts previous change to restore waiting for state hydration before checking feature flags in App.tsx, with tests in App.spec.tsx.

  • Behavior:
    • Restores behavior in App.tsx to wait for didHydrateState and telemetrySetting before checking PostHog feature flags.
    • Updates useEffect dependencies to include didHydrateState and telemetrySetting.
  • Tests:
    • Adds tests in App.spec.tsx to verify feature flags are checked only after state hydration and when telemetry is enabled.
    • Ensures feature flags are not checked if telemetry is disabled or state is not hydrated.

This description was created by Ellipsis for 0e2f2cf. You can customize this summary. It will automatically update as commits are pushed.

@mrubens mrubens requested review from cte and jr as code owners November 22, 2025 03:06
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 22, 2025
@mrubens mrubens merged commit e31743c into main Nov 22, 2025
7 checks passed
@mrubens mrubens deleted the revert-9491-revert-9488-wait_for_hydrate_state_to_experiment branch November 22, 2025 03:06
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 22, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Nov 22, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 22, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

This PR correctly re-introduces guards to prevent premature PostHog feature flag checks before state hydration and includes comprehensive test coverage.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 22, 2025
* Changeset version bump (RooCodeInc#9005)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <[email protected]>

* config(rooignore): remove ignored directories from exclusion list

* fix: correct OpenRouter Mistral model dimension from 3072 to 1536 (RooCodeInc#9028)

* Revert "fix: prevent UI flicker and enable resumption after task cancellation" (RooCodeInc#9032)

* chore: add changeset for v3.30.1 (RooCodeInc#9033)

* Changeset version bump (RooCodeInc#9034)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* fix: eliminate UI flicker during task cancellation (RooCodeInc#9037)

* fix: eliminate UI flicker during task cancellation

- Modify ClineProvider.createTaskWithHistoryItem() to detect when rehydrating current task
- Implement in-place task replacement to avoid empty stack state that causes UI flicker
- Add comprehensive unit tests for flicker-free cancel behavior
- Maintain backward compatibility and proper event listener cleanup

Fixes the jarring navigation to home view when cancelling tasks

* fix: ensure proper garbage collection of old task during flicker-free rehydration

- Call abortTask(true) on old task before replacement to stop processes and mark as abandoned
- This ensures proper cleanup and prevents memory leaks during task cancellation
- Add test verification for abortTask cleanup

* feat: add file path tooltips with centralized PathTooltip component (RooCodeInc#9030)

- Add PathTooltip component that wraps StandardTooltip with proper styling
- Use maxWidth='min(300px,100vw)' via inline style to override defaults
- Apply '[text-wrap:wrap]' class to override text-balance behavior
- Add formatPathTooltip helper for consistent path content formatting
- Update CodeAccordian, ChatRow, and BatchFilePermission to use PathTooltip
- Centralizes tooltip behavior and reduces duplication

Supersedes PR RooCodeInc#8797.

* fix: keep pinned models fixed at top of scrollable list (RooCodeInc#8813)

* fix: keep pinned models fixed at top of scrollable list

- Separated pinned and unpinned configs into different containers
- Pinned configs now stay fixed at the top
- Only unpinned configs are scrollable
- Added tests to verify the fixed behavior

Fixes RooCodeInc#8812

* fix: resolve sticky header visual artifact in ApiConfigSelector

- Changed sticky header background from bg-vscode-editorWidget-background to bg-vscode-dropdown-background to match popover container
- Moved separator logic into sticky container as conditional bottom border to prevent scroll artifacts
- Updated tests to match new separator structure
- All 21 tests passing

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>

* Set Claude Sonnet 4.5 as default for key providers (RooCodeInc#8922)

* fix(checkpoints): resolve incorrect commit location when GIT_DIR set in Dev Containers (RooCodeInc#8811)

* Update cerebras.ts (RooCodeInc#9024)

* fix: update Opus 4.1 max tokens from 8K to 32K (RooCodeInc#9046)

Aligns claude-opus-4-1-20250805 max token limit with claude-opus-4-20250514,
both models now supporting 32K output tokens (overridable to 8K when
enableReasoningEffort is false).

Fixes RooCodeInc#9045

Co-authored-by: Roo Code <[email protected]>

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* feat(api): add mode parameter to ZgsmAiHandler and add tooltips to ChatRow buttons

* chore: simplify Google Analytics to standard implementation (RooCodeInc#9044)

Co-authored-by: Roo Code <[email protected]>

* feat: add conditional test running to pre-push hook (RooCodeInc#9055)

* Fix dynamic provider model validation to prevent cross-contamination (RooCodeInc#9054)

* Fix Bedrock user agent to report full SDK details (RooCodeInc#9043)

* feat: add Qwen3 embedding models (0.6B and 4B) to OpenRouter support (RooCodeInc#9060)

Co-authored-by: Roo Code <[email protected]>

* web: Agent Landing Page A/B testing toolkit (RooCodeInc#9018)

Co-authored-by: Roo Code <[email protected]>

* feat: Global Inference for Bedrock models (RooCodeInc#8750) (RooCodeInc#8940)

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>

* Release v3.30.2 (RooCodeInc#9065)

chore: add changeset for v3.30.2

* Changeset version bump (RooCodeInc#9066)

* changeset version bump

* Revise CHANGELOG for version 3.30.2

Updated changelog for version 3.30.2 with new features and fixes.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* Merge branch 'main' of github.com:zgsm-ai/costrict into roo-to-main

* feat(error-handling): add HTTP 413 payload too large error handling

* fix(webview): correct default value for useZgsmCustomConfig and fix settings message order

* feat: add kimi-k2-thinking model to moonshot provider (RooCodeInc#9079)

* ux: Home screen visuals (RooCodeInc#9057)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>

* feat: add MiniMax-M2-Stable model and enable prompt caching (RooCodeInc#9072)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Daniel <[email protected]>

* fix(task): auto-retry on empty assistant response (RooCodeInc#9076) (RooCodeInc#9083)

* feat(chat): Improve diff appearance in main chat view (RooCodeInc#8932)

Co-authored-by: daniel-lxs <[email protected]>

* Clarify: setting 0 disables Error & Repetition Limit (RooCodeInc#8965)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>

* fix: use system role for OpenAI Compatible provider when streaming is disabled (RooCodeInc#8216)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>

* fix: prevent shell injection in pre-push hook environment loading (RooCodeInc#9059)

* feat: auto-switch to imported mode with architect fallback (RooCodeInc#9003)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Seth Miller <[email protected]>
Co-authored-by: heyseth <[email protected]>
Co-authored-by: Roo Code <[email protected]>

* fix: prevent notification sound on attempt_completion with queued messages (RooCodeInc#8540)

Co-authored-by: Roo Code <[email protected]>

* chore(deps): update dependency @changesets/cli to v2.29.7 (RooCodeInc#8490)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: add changeset for v3.30.3 (RooCodeInc#9092)

* Changeset version bump (RooCodeInc#9094)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* fix: respect custom OpenRouter URL for all API operations (RooCodeInc#8951)

Co-authored-by: Roo Code <[email protected]>

* feat: Add comprehensive error logging to Roo Cloud provider (RooCodeInc#9098)

feat: add comprehensive error logging to Roo Cloud provider

- Add detailed error logging in handleOpenAIError() to capture error details before transformation
- Enhanced getRooModels() to log HTTP response details on failed requests
- Added error context logging to RooHandler streaming and model loading
- All existing tests passing (48 total)

* ux: Less Caffeine (RooCodeInc#9104)

Prevents stress on Roo's hip bones

* fix: prevent crash when streaming chunks have null choices array (RooCodeInc#9105)

* ux: Improvements to to-do lists and task headers (RooCodeInc#9096)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* fix: prevent context condensing on settings save when provider/model unchanged (RooCodeInc#9108)

Co-authored-by: Matt Rubens <[email protected]>

* Release v3.31.0 (RooCodeInc#9111)

* Changeset version bump (RooCodeInc#9112)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* fix: improve mobile responsiveness of hero section on /reviewer page (RooCodeInc#9138)

Co-authored-by: Roo Code <[email protected]>

* feat(integrations): update export markdown filename to include 'costrict' prefix

* feat(core): enhance attempt_completion parsing with flexible result handling

* test(core): update test configurations and CSP settings

* feat: add Google Tag Manager to marketing website (RooCodeInc#9148)

* feat: add Google Tag Manager to marketing website using Next.js Script component

* refactor: remove Google Ads implementation in favor of Tag Manager

* fix: wrap GTM script in consent-checking client component for GDPR compliance

---------

Co-authored-by: Roo Code <[email protected]>

* IPC command for sending messages to the current task (RooCodeInc#9149)

* fix: prevent command_output ask from blocking in cloud/headless environments (RooCodeInc#9152)

* chore: add changeset for v3.31.1 (RooCodeInc#9153)

* Release: v1.85.0 (RooCodeInc#9155)

* Gate XML out when native tool protocol is ON (RooCodeInc#9107)

* Add native tool definitions (RooCodeInc#9156)

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <[email protected]>

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <[email protected]>

* Move auto-approval from `ChatView` to `Task` (RooCodeInc#9157)

* feat(i18n): add internationalization for unexpected API response error message

* fix(task): use consistent error message for API response failures and ensure message queue is never undefined

* test: update vscode mock and improve test coverage

* fix: Model switch re-applies selected profile (sync task.apiConfiguration) (RooCodeInc#9179) (RooCodeInc#9181)

* Add custom Button component with variant system (RooCodeInc#9150)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>

* Changeset version bump (RooCodeInc#9154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* feat(core): detect API configuration changes for model switching

* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <[email protected]>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

---------

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <[email protected]>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* Add native tool call support (RooCodeInc#9159)

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (