BUG
*> When SWITCHLY_SERVER_URL is not set, `switchly config set-url` seems not to work
*> Closing/shutting down the fastapi server should not hang and ask to close dashboard sse connections `Waiting for connections to close.`
* replace `code` key in the return response, might confuse users with status_code
* when a user logout, close their sse connection 
* do we want to disable or deactivate routes mutation buttons in global maintenance mode
* seeing spikes of this in prod `switchly: rate limit reset failed: Error 111 connecting to localhost:6379. Connection refused.` redis multi worker


BIG BUG
* When routes are annotated with @rate_limit, at startup we see duplicate registered routes in policy and unprotected routes
* adding policy to an unprotedted route, moves it to policy table but still keeps reference in the unprotected routes table

FEATURE
* load test dashboard -> can we add sorting to the per endpoint breakdown fields, so users can sort by any field asc or desc
* should we reintroduce flag live event streaming and health check and make the FlagEventBus persistent (redis and file backends) for flag live events streaming
* isn't there any audit logs for flag and segment mutations
* schedule rate limit policies
* dashboard state counts should auto refresh and update when a state changes
* configure cli option to read backend storage directly, helps for instances where the whole application is down.
* schedule_repeat window option that repeats the scheduled window time
*can we support from python 3.9
* support regex matching for api route state changes
* users configure to archive old audit/blocked request logs to a location
* add the value of the key strategy, example for ip, we log the ip address, for user (the user value passed whether id or name), so application owners know what is happening. Add to the recent blocked
* support for custom rate limiting backend storage for users wanting custom backend
* websocket endpoint support
* shared function defined to act on any of the decorators and can be applied to multiple routes
* add dark mode to the dashboard UI


OPTIMIZATION
* when Changing route state from it's current state to the same state, do nothing, show the client a message that is the current state
* why are we sending lots of `"GET /openapi.json HTTP/1.1" 200 OK` 


TO-KNOW
uv pip install build
uv pip install twine
rm -rf build/ dist/ *.egg-info
uv build
uv run twine upload dist/* --username __token__ --password pypi-YOUR_TOKEN_HERE

uv lock

uv run mkdocs serve

uv cache clean 

RAILWAY
brew install railway
railway login
railway init          # creates a new project
railway add --database redis
railway variables set SWITCHLY_ENV=production <key:val>
SWITCHLY_ADMIN_PASS, SWITCHLY_ADMIN_USER, WEB_CONCURRENCY=<number>
railway variables set PORT=8000
railway up
railway domain   # generates a public HTTPS URL


CI RELEASE
# bump version
vim pyproject.toml   # e.g. 0.3.0 → 0.4.0

git commit -m "chore: bump version to 0.4.0"
git push origin develop

# open PR: develop → main, merge it
# → CI runs, new tag v0.4.0 is created, PyPI is updated, GitHub Release is created

git fetch origin

GITHUB ISSUE RELATED
git checkout develop
git fetch origin
git reset --hard origin/main
git push --force origin develop


git checkout develop
git pull origin develop
git merge --ff-only origin/main
git push origin develop


CHECK OUT
* https://github.com/mE-uMAr/fastapi-crons
* https://github.com/rrd108/nuxt-switchly

