Skip to content

Persist chat sidebar width and Living UI visibility#386

Open
BharadwajKanneveti wants to merge 1 commit into
CraftOS-dev:devfrom
BharadwajKanneveti:fix/browser-store-ui-state
Open

Persist chat sidebar width and Living UI visibility#386
BharadwajKanneveti wants to merge 1 commit into
CraftOS-dev:devfrom
BharadwajKanneveti:fix/browser-store-ui-state

Conversation

@BharadwajKanneveti

Copy link
Copy Markdown

Summary

This PR persists chat layout preferences so they survive navigation and browser refreshes.

Changes

  • Main Chat

    • Persist the task sidebar width in localStorage.
    • Restore the saved width on initial render.
    • Validate stored values by:
      • Falling back to the default width when no value exists.
      • Ignoring invalid (NaN) values.
      • Clamping the restored width between the configured minimum and maximum limits.
    • Save the final sidebar width when resizing ends to avoid unnecessary writes during dragging.
  • Living UI

    • Persist the chat panel visibility (Hide Chat / Show Chat) in localStorage.
    • Restore the previous visibility state on initial render so the panel remains hidden or visible across navigation and page refreshes.

Testing

  • Main Chat

    • Resized the task sidebar, refreshed the page, and verified the width was restored.
    • Resized the task sidebar, navigated away and back, and verified the width persisted.
    • Verified the default width is used when no saved value exists.
  • Living UI

    • Hid the chat panel, refreshed the page, and verified it remained hidden.
    • Hid the chat panel, navigated away and back, and verified it remained hidden.
    • Toggled the chat panel back on and verified the visibility preference persisted.

Closes #379

@BharadwajKanneveti

Copy link
Copy Markdown
Author

Hi @ahmad-ajmal I have made the changes please check and let me know if you find any issue.

@CraftOS-dev
CraftOS-dev requested a review from ahmad-ajmal July 17, 2026 06:38
@makiroll1125 makiroll1125 self-assigned this Jul 21, 2026
@makiroll1125
makiroll1125 self-requested a review July 21, 2026 06:03
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