Refactor cache path and standardize layout storage keys#71
Conversation
The FLASHTnT Layout Manager appeared to "save" layouts (success toast
and download button worked) but the Tagger Viewer never applied them.
Root cause: FLASHTnTLayoutManager built its FileManager against
`workspace/flashtnt/cache`, while FLASHTnTViewer read from
`workspace/cache`. The Layout Manager wrote to an orphan SQLite DB
that nobody read, so `result_exists('layout', 'layout')` in the Viewer
always returned False and it fell back to DEFAULT_LAYOUT. This is the
same class of bug fixed for FLASHDeconv in f107715; the analogous fix
was never propagated to FLASHTnT (added separately in #12).
Just realigning the path is unsafe: it would land FLASHTnT's layout
on the same SQLite row+pickle as FLASHDeconv's (`dataset_id='layout'`),
so one tool's save would overwrite the other's, and a Reset Setting
in one tool would call `remove_results('layout')` and wipe both. Move
FLASHTnT to a dedicated `dataset_id='flashtnt_layout'` so it gets a
distinct row (`stored_data` filters by `id`) and a distinct file
(`cache_path/files/flashtnt_layout/layout.pkl.gz`). FLASHDeconv keeps
its existing `'layout'` id so pre-existing user layouts survive.
|
Warning Review limit reached
More reviews will be available in 55 minutes and 45 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
This PR refactors the cache directory structure and standardizes the storage keys used for layout persistence in FLASHTnT, improving consistency and simplifying the file organization.
Key Changes
workspace/flashtnt/cachetoworkspace/cache, removing the redundantflashtntsubdirectory level'layout'to'flashtnt_layout'across all file manager operations to:get_layout()return statement and removed trailing whitespace inFLASHTnTViewer.pyFiles Modified
content/FLASHTnT/FLASHTnTLayoutManager.py: Updated cache path initialization and all layout storage/retrieval operationscontent/FLASHTnT/FLASHTnTViewer.py: Updated layout retrieval to use new storage keyImplementation Details
All file manager calls (
store_data,result_exists,get_results,remove_results) have been updated consistently to use the new'flashtnt_layout'key, ensuring layout persistence continues to work correctly across the application.https://claude.ai/code/session_01YTN6PkcSfg2b21zHL7cYGg