Skip to content

Conversation

@yujonglee
Copy link
Contributor

No description provided.

include finalizing session mode
- Use `templateId || undefined` instead of `templateId ?? undefined`
  to coerce empty-string values to undefined so template id 
  normalization treats empty strings the same as missing values.
  Normalize existing template id value (`existingTemplateId || 
  undefined`) before comparison to avoid false mismatches when stored 
  values are empty strings.
  Treat "finalizing" sessionMode as a running state that short-circuits
  enhanced-note processing, preventing modification during finalization.
  ese changes fix incorrect equality checks and ensure enhanced note
logic behaves correctly for empty template ids and during finalization.
@netlify
Copy link

netlify bot commented Nov 25, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 33f1c28
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69259a220a1d340008d6532d
😎 Deploy Preview https://deploy-preview-1882--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 25, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 33f1c28
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/69259a22afb134000868211a
😎 Deploy Preview https://deploy-preview-1882--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Normalize empty templateId to undefined and add an early return for sessionMode === "finalizing" in the enhanced notes hook; replace Streamdown inline status rendering with a LayoutGroup + motion wrapper and sticky status rendering in streaming UI; reduce streaming smoothStream delay from 350ms to 250ms.

Changes

Cohort / File(s) Change Summary
Enhanced notes hook
apps/desktop/src/hooks/useEnhancedNotes.ts
Treat empty-string templateId as undefined by switching ?? → `
Streaming UI & layout
apps/desktop/src/components/main/body/sessions/note-input/enhanced/streaming.tsx
Replace direct Streamdown rendering with a LayoutGroup containing a motion.div wrapper; move status into a separate, conditionally rendered sticky motion.div shown only when isGenerating; remove isAnimating prop usage on Streamdown; Status renders as a plain button.
Stream timing config
apps/desktop/src/store/zustand/ai-task/task-configs/enhance-workflow.ts
Reduce smoothStream transform delayInMs from 350 to 250 (chunking remains "line").

Sequence Diagram(s)

Feature: useEnhancedNotes — early-return during finalizing and templateId normalization

sequenceDiagram
    participant UI
    participant useEnhancedNotes
    participant Storage

    UI->>useEnhancedNotes: call (sessionMode, templateId)
    alt sessionMode == "finalizing"
        useEnhancedNotes-->>UI: return early (no default summary)
    else
        useEnhancedNotes->>Storage: normalize templateId ('' -> undefined)
        useEnhancedNotes->>Storage: compare existingTemplateId (normalized)
        useEnhancedNotes-->>UI: proceed with create/ensure default summary if needed
    end
Loading

Feature: Streaming UI rendering change (high-level)

sequenceDiagram
    participant Renderer
    participant LayoutGroup
    participant MotionWrapper
    participant Streamdown
    participant Status

    Renderer->>LayoutGroup: render
    LayoutGroup->>MotionWrapper: wrap streamed content
    MotionWrapper->>Streamdown: stream content (no isAnimating prop)
    alt isGenerating == true
        LayoutGroup->>Status: render sticky status (motion div)
        Status-->>Renderer: show generating state
    else
        LayoutGroup-->>Renderer: hide status
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Review useEnhancedNotes.ts normalization and ensure no unintended effects for other falsy values.
  • Verify early-return placement in useEnsureDefaultSummary and related side effects.
  • Validate streaming UI layout/animation behavior and accessibility of the sticky status.
  • Confirm reduced delayInMs in enhance-workflow.ts meets UX expectations and doesn't break timing assumptions.

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to evaluate whether the description relates to the changeset. Add a description explaining the bug being fixed, the root cause, and how the changes resolve the duplication issue.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix duplicated enhanced tab' is specific and relates to the changeset, which includes fixes in useEnhancedNotes.ts to prevent duplicate behavior during certain states.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c577246 and 33f1c28.

📒 Files selected for processing (2)
  • apps/desktop/src/components/main/body/sessions/note-input/enhanced/streaming.tsx (4 hunks)
  • apps/desktop/src/store/zustand/ai-task/task-configs/enhance-workflow.ts (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@yujonglee yujonglee changed the title fix duplicated enhanced tab fix duplicated enhanced tab & streaming UI enhancement Nov 25, 2025
@yujonglee yujonglee merged commit a56f760 into main Nov 25, 2025
10 of 13 checks passed
@yujonglee yujonglee deleted the yl-branch-60 branch November 25, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants