[codex] split instagram runtime facade#4
Draft
rdh073 wants to merge 4 commits into
Draft
Conversation
added 4 commits
April 10, 2026 22:36
…ailure - Explicitly set status='active' in status_repo after relogin, since activate_account_client only updates the legacy in-memory state - Push SSE 'account_updated' event with status='error' when hydrate fails and the client was evicted, so the frontend reflects reality immediately instead of showing stale 'active' until next refresh - Skip follower count refresh when the session is dead
…sues
- Refactor bulk_relogin_accounts to delegate to relogin_account via
asyncio.to_thread, fixing missing status_repo.set('active') on success
and unreliable username from legacy state dict on SQL backends
- Add type annotation to _hydrate_and_publish usecases parameter
- Remove duplicate 'import time' inside _bulk_hydrate_sequential
- Hoist logger creation outside the loop in _bulk_hydrate_sequential
- Normalize SSE key from 'profile_pic_url' to 'avatar' in verify
endpoint to match HTTP response key
- SSE: add MAX_RETRIES=10, exponential backoff, connectionLost state - AppLayout: surface connection-lost banner with role=alert - Modal: add focus trapping (Tab/Shift+Tab cycling) for a11y - accountsUI store: remove persist middleware for ephemeral state - usePostJobStream: relocate to features/posts/hooks (thin re-export) - AccountsPage: extract 11 components under features/accounts/components (1464 → 472 lines) - OperatorCopilotPage: extract 9 components under features/copilot/components (1124 → 612 lines) - Tailwind: register Tokyo Night palette in @theme for semantic utilities (text-tokyo-cyan, bg-tokyo-rose, etc.)
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.
What changed
backend/instagram.pyinternals into a newbackend/instagram_runtime/packagebackend/instagram.pyas the legacy facade entry pointWhy
backend/instagram.pyhad grown into a large legacy boundary. This task reduces file size and separates concerns while preserving the legacy import surface expected by the rest of the backend.Impact
instagrambackend/instagram_runtime/Validation
.venv/bin/python -c 'import instagram; print(len([s for s in dir(instagram) if not s.startswith("_")]))'timeout 5 .venv/bin/python -m uvicorn app.main:app --port 8002