Add conversation project organization and detail workflow#463
Add conversation project organization and detail workflow#463AnthonyRonning merged 12 commits intomasterfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughUpgrades Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Sidebar
participant MoveDialog as MoveChatsDialog
participant OS as OpenSecretAPI
participant ChatList as ChatHistoryList
participant LocalState as LocalState Context
participant Unified as UnifiedChat
User->>Sidebar: Click "Move Selected"
Sidebar->>Sidebar: Dispatch "openbulkmove" CustomEvent
Sidebar->>MoveDialog: Event opens dialog
User->>MoveDialog: Select destination, confirm
MoveDialog->>OS: batchUpdateConversationProject(chatIds, projectId)
OS-->>MoveDialog: Success
MoveDialog->>ChatList: Invalidate conversation/project queries
ChatList->>OS: Re-fetch conversations (project-scoped)
OS-->>ChatList: Updated conversation list
ChatList->>User: Render updated groups
User->>ChatList: Click "New Chat"
ChatList->>LocalState: Read selectedProjectId
LocalState-->>ChatList: projectId
ChatList->>Unified: Dispatch "newchat" CustomEvent {detail:{projectId}}
Unified->>Unified: Set draftProjectId from event
User->>Unified: Send message
Unified->>OS: createConversation({}, {project_id: draftProjectId})
OS-->>Unified: Conversation created in project
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This keeps chat history manageable with projects, pinning, batch moves, and project-aware new chats while preserving the existing chat flow. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Use the new conversation activity field and unassigned-project filter so recents, pinned chats, and project views stay separated without crowding the selection controls. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
b94a7ce to
611091b
Compare
Deploying maple with
|
| Latest commit: |
0db7abe
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ed2444c3.maple-ca8.pages.dev |
| Branch Preview URL: | https://conversation-projects.maple-ca8.pages.dev |
|
Issue When viewing a chat that is inside a project, clicking the "New Chat" button at the top of the sidebar does not work. It briefly goes to the new chat screen and immediately redirects back to chat that you were viewing. The "New Chat" button works correctly when viewing a chat that is not inside of a project. |
Keep new chat actions consistent across project flows and prevent stale conversation loads from restoring the previous chat. Also make active project selection visible in the composer. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
good find, fixed. |
|
Issue When creating a new chat within a project, either from the Project details screen or from the main New Chat screen, the title of the new chat remains "New Conversation" until it is reloaded on the screen. This can happen by collapsing the project in the sidebar and expanding again, refreshing the entire page, or by selecting "View Project". |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/src/components/UnifiedChat.tsx (1)
2680-2693: Consider addingdocumentNameto the dependency array.
documentNameis read directly in the function body (e.g., line 2367:const originalDocumentName = documentName), but it's not included in the dependency array. While this is unlikely to cause issues in practice since state changes trigger re-renders, it would be flagged by ESLint'sexhaustive-depsrule.♻️ Suggested fix
[ input, isGenerating, openai, os, conversation, draftProjectId, localState.model, draftImages, documentText, + documentName, clearAllAttachments, processStreamingResponse, isWebSearchEnabled ]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/components/UnifiedChat.tsx` around lines 2680 - 2693, The dependency array for the effect in the UnifiedChat component is missing documentName, which is referenced in the function body; update the dependency array (the array containing input, isGenerating, openai, os, conversation, draftProjectId, localState.model, draftImages, documentText, clearAllAttachments, processStreamingResponse, isWebSearchEnabled) to include documentName so the effect reacts when documentName changes and satisfies ESLint exhaustive-deps; locate the effect in UnifiedChat.tsx where originalDocumentName = documentName is used and add documentName to that dependency array.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@frontend/src/components/UnifiedChat.tsx`:
- Around line 2680-2693: The dependency array for the effect in the UnifiedChat
component is missing documentName, which is referenced in the function body;
update the dependency array (the array containing input, isGenerating, openai,
os, conversation, draftProjectId, localState.model, draftImages, documentText,
clearAllAttachments, processStreamingResponse, isWebSearchEnabled) to include
documentName so the effect reacts when documentName changes and satisfies ESLint
exhaustive-deps; locate the effect in UnifiedChat.tsx where originalDocumentName
= documentName is used and add documentName to that dependency array.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 43adceb9-823d-4497-a74e-dd603dc9e107
📒 Files selected for processing (2)
frontend/src/components/ConversationProjectPicker.tsxfrontend/src/components/UnifiedChat.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- frontend/src/components/ConversationProjectPicker.tsx
Keep project, pinned, and recent chat lists in sync when a new conversation title is generated so users do not need to reload to see the final name. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
nice fixed |
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Load all project, pinned, and project-scoped conversation pages so sidebar and picker views stay complete for larger accounts. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Keep project bulk actions aligned with the sidebar selection workflow so users get the same limits and feedback across both views. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Surface bulk delete and move errors in project detail views so failed batch actions do not silently disappear. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Keep bulk move dialogs open until the move succeeds so failures surface inline instead of looking like successful closes. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
Testing Projects and Pinned Chats
|
|
Tested and working well! The only small odd thing I saw that isn't really a bug has to do with dates on chats. And we are doing away with dates in the redesign, so this probably doesn't matter.
|
Make project deletion use the same typed confirmation pattern as other destructive flows so users must explicitly acknowledge deleting the project and its chats. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
@TestFlight build |
|
🚀 TestFlight deployment triggered! Check the Actions tab for progress. |
|
✅ TestFlight deployment completed successfully! |
|
Issue If you are on the project details page and move an existing chat into the project, it doesn't show up on the details page until you refresh. The opposite works correctly: moving a chat out of the project updates the screen immediately. |
Reload the project detail list when conversation project metadata changes so chats moved into or out of the active project appear immediately. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
| window.history.replaceState({}, "", params.toString() ? `/?${params}` : "/"); | ||
|
|
||
| // Dispatch event to clear UnifiedChat | ||
| window.dispatchEvent(new Event("newchat")); |
There was a problem hiding this comment.
🟡 newchat dispatched as plain Event (not CustomEvent) when deleting a non-archived conversation, keeping stale project context
When a non-archived conversation is deleted and it is the current chat, ChatHistoryList.tsx:677 dispatches new Event("newchat") — a plain Event without a detail payload. In UnifiedChat.handleNewChat (UnifiedChat.tsx:1157-1161), this causes the event instanceof CustomEvent check to be false, so nextProjectId falls back to selectedProjectId ?? null instead of being explicitly set to null. If the deleted conversation belonged to a project, selectedProjectId still holds that project's ID (set at ChatHistoryList.tsx:1083 when the conversation was originally selected), so draftProjectId is set to that project. The next message the user sends will silently create a new conversation inside that project. All other newchat dispatch sites use new CustomEvent("newchat", { detail: { projectId: ... } }) to explicitly control the project context.
| window.dispatchEvent(new Event("newchat")); | |
| window.dispatchEvent(new CustomEvent("newchat", { detail: { projectId: null } })); |
Was this helpful? React with 👍 or 👎 to provide feedback.
|
@TestFlight build |
|
🚀 TestFlight deployment triggered! Check the Actions tab for progress. |
|
✅ TestFlight deployment completed successfully! |

Summary
Testing
Notes
frontend/package.jsoncurrently points@opensecret/reacttofile:../../OpenSecret-SDK, which looks like a local-only dependency path and may need follow-up before merge.Summary by CodeRabbit
New Features
Bug Fixes