Skip to content

Conversation

@Emt-lin
Copy link
Collaborator

@Emt-lin Emt-lin commented Dec 30, 2025

issues

Summary

  • Add file processing status display in Context Manage Modal with real-time Processing/Processed/Failed badges
  • Fix think block collapse state lost during streaming → history message transition using stable message ID approach

Changes

Feature Description
File status display Status badge on ItemCard, real-time for current project, cached for others
Think block state Generate stable ID (msg-uuid) at streaming start, reuse for final message, collapse state naturally inherits

Test plan

  • Open Context Manage Modal, verify file status badges display correctly
  • Switch projects, verify cached status shows properly
  • Send message with think block, collapse it, confirm state persists after streaming ends

Actual Effect

CleanShot 2025-12-30 at 18 41 11
2025-12-30.18.42.43.mov

@Emt-lin
Copy link
Collaborator Author

Emt-lin commented Dec 30, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@Emt-lin
Copy link
Collaborator Author

Emt-lin commented Dec 31, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@Emt-lin Emt-lin requested a review from logancyang January 5, 2026 12:55
…transition.

# Conflicts:
#	src/components/chat-components/ChatSingleMessage.tsx
…eaming transitions

- Add container reference to ToolCallRootRecord for detecting container changes
- Handle container mismatch when streaming component unmounts and history mounts
- Use container.isConnected for stale cleanup instead of timestamp-only approach
- Prevent double toggle on think blocks by handling state in pointerdown
@Emt-lin Emt-lin force-pushed the file-status-and-think-block-state branch from 2eecd07 to 2a1f5cc Compare January 13, 2026 03:49
@logancyang
Copy link
Owner

@Emt-lin can you verify this?

 - In src/components/modals/project/context-manage-modal.tsx:212, getProjectContextItemStatus first checks real‑time state (processing, failed,
    success) when isCurrentProject is true, but then it always falls through to the cachedFiles check. So for the current project, any file that
    exists in the cache is shown as “Processed” even if it hasn’t been processed in the current run.
  - cachedFiles is built from ProjectContextCache.fileContexts in src/components/modals/project/context-manage-modal.tsx:425. Those entries are
    created by updateProjectFilesFromPatterns in src/cache/projectContextCache.ts:737, which assigns a cacheKey for all matching files up front
    (including non‑markdown) — this does not guarantee the file has been parsed or that the cached content is valid.
  - Net effect: “Processed” can mean “has a cacheKey in fileContexts,” not “processed in this run.” If the project was just invalidated or the load
    state was cleared, the modal can still show “Processed” for stale or not‑started files, which contradicts the comment and masks “Not started.”

  Concrete example:

  - You open the modal right after invalidation or before load starts. processing/success/failed are empty, but fileContexts still has entries →
    everything shows “Processed” even though the current run hasn’t touched them.

…ed check

For the current project, if a file is not in processing/failed/success
real-time state, it should show "Not started" instead of incorrectly
showing "Processed" based on cached fileContexts entries.
@Emt-lin
Copy link
Collaborator Author

Emt-lin commented Jan 13, 2026

@Emt-lin can you verify this?

 - In src/components/modals/project/context-manage-modal.tsx:212, getProjectContextItemStatus first checks real‑time state (processing, failed,
    success) when isCurrentProject is true, but then it always falls through to the cachedFiles check. So for the current project, any file that
    exists in the cache is shown as “Processed” even if it hasn’t been processed in the current run.
  - cachedFiles is built from ProjectContextCache.fileContexts in src/components/modals/project/context-manage-modal.tsx:425. Those entries are
    created by updateProjectFilesFromPatterns in src/cache/projectContextCache.ts:737, which assigns a cacheKey for all matching files up front
    (including non‑markdown) — this does not guarantee the file has been parsed or that the cached content is valid.
  - Net effect: “Processed” can mean “has a cacheKey in fileContexts,” not “processed in this run.” If the project was just invalidated or the load
    state was cleared, the modal can still show “Processed” for stale or not‑started files, which contradicts the comment and masks “Not started.”

  Concrete example:

  - You open the modal right after invalidation or before load starts. processing/success/failed are empty, but fileContexts still has entries →
    everything shows “Processed” even though the current run hasn’t touched them.

fixed

@logancyang
Copy link
Owner

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@logancyang logancyang merged commit 538033e into master Jan 13, 2026
2 checks passed
@logancyang logancyang deleted the file-status-and-think-block-state branch January 13, 2026 06:52
@logancyang logancyang mentioned this pull request Jan 15, 2026
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.

3 participants