Fix issue #17: Fokus Task is not kept in local storage#18
Merged
Conversation
- Remove FOCUS_FIX_DOCUMENTATION.md, test_focus_logic.html, test_focus_logic.js - Remove explanatory comments per AGENTS.md coding standards - Remove unreachable return after exhaustive switch - Add .openhands_instructions to enforce project rules for OpenHands Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes #17.
The issue has been successfully resolved by modifying the focus service to preserve the focus state during data loading. The key changes include:
Modified the focus validation effect in
focus.service.tsto check if data is loaded before clearing the focus. Instead of immediately clearing the focus when the item can't be resolved, it now checksisDataLoadedForTarget(target)first.Added
isDataLoadedForTarget(target)method that returns:!this.data.ticketsLoading()for tickets!this.data.pullRequestsLoading()for pull requeststruefor todos/ideas (since their data is immediately available from local storage)Updated tests in
focus.service.spec.tsto verify:The fix ensures that during a page refresh:
This directly addresses the original issue where focus was lost on page refresh due to premature clearing before data was loaded.
Automatic fix generated by OpenHands 🙌