Skip to content

Conversation

@mkh-user
Copy link
Member

@mkh-user mkh-user commented Sep 16, 2025

Type of Change

  • Bug fix

Description

Previously, the ability to save and restore opened panels was designed, but due to the loading of panels after restoration, the editor's state always returned to the first panel. In this change, the panels are loaded first, and then the last state before closing is restored.

Testing

Works fine for all panels.

Impact

Nothing

Additional Information

Nothing

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings
  • Changes were added to CHANGELOG

Summary by CodeRabbit

  • Bug Fixes

    • Panels now consistently restore their open/closed state across sessions, improving layout reliability.
  • Documentation

    • Changelog updated under “Unreleased” with a “Fixed” entry noting panel state restoration.

@mkh-user mkh-user force-pushed the restore-opened-panel branch from 69becf6 to db1d6da Compare September 16, 2025 13:44
@mkh-user mkh-user self-assigned this Sep 16, 2025
@mkh-user mkh-user added the bug A confirmed issue causing incorrect behavior or unexpected results label Sep 16, 2025
@mkh-user mkh-user added this to the Text Forge 0.2 milestone Sep 16, 2025
@mkh-user mkh-user moved this to In Progress in Release: Text Forge 1.0 Sep 16, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 16, 2025

Warning

Rate limit exceeded

@mkh-user has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3fad9bf and 993fb4f.

📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • core/scripts/panel_manager.gd (2 hunks)

Walkthrough

Defers layout loading in panel_manager.gd by moving the _load_layout() call to occur after _load_panels(). Adds a "Fixed" entry to CHANGELOG.md under [unreleased] noting "Restore panel open state (#103)".

Changes

Cohort / File(s) Summary of changes
Documentation
CHANGELOG.md
Added a "Fixed" subsection under the [unreleased] section with entry: "Restore panel open state (#103)".
Panel management scripts
core/scripts/panel_manager.gd
Reordered initialization: removed early _load_layout() from start of _ready() and added _load_layout() after _load_panels() so layout loads after panels; no exported/public API changes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor User
    participant PM as PanelManager
    participant PL as PanelsLoader
    participant LL as LayoutLoader

    rect rgba(230,240,255,0.5)
    note over PM: Old flow (before)
    User->>PM: _ready()
    PM->>LL: _load_layout()
    PM->>PL: _load_panels()
    end

    rect rgba(230,255,230,0.5)
    note over PM: New flow (after)
    User->>PM: _ready()
    PM->>PL: _load_panels()
    PM->>LL: _load_layout()
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hopped through panels, one by one,
Now load the friends before the fun.
Doors remember where they stay,
Restored and ready for the day.
🐇🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Restore panel open state" is a short, single-sentence summary that directly reflects the primary change (restoring the last-opened panel state by adjusting panel load/restore order), so it is concise, specific, and appropriate for a teammate scanning the history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

coderabbitai[bot]

This comment was marked as off-topic.

coderabbitai[bot]

This comment was marked as resolved.

@mkh-user mkh-user force-pushed the restore-opened-panel branch from fce8170 to 993fb4f Compare September 16, 2025 14:22
@mkh-user mkh-user merged commit b5d71ef into Main Sep 16, 2025
2 checks passed
@mkh-user mkh-user deleted the restore-opened-panel branch September 16, 2025 14:27
@github-project-automation github-project-automation bot moved this from In Progress to Completed in Release: Text Forge 1.0 Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A confirmed issue causing incorrect behavior or unexpected results

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

2 participants