Skip to content

Add management UI for repost cleanup - #17

Open
matthewladams wants to merge 1 commit into
masterfrom
codex/create-management-ui-for-reposts
Open

Add management UI for repost cleanup#17
matthewladams wants to merge 1 commit into
masterfrom
codex/create-management-ui-for-reposts

Conversation

@matthewladams

Copy link
Copy Markdown
Owner

Motivation

  • Provide a simple web-based management UI so saved posts/reposts can be reviewed and deleted during testing.
  • Keep the UI lightweight and easy to style by using Tailwind via CDN.
  • Make the UI optional and non-blocking so it can run alongside the Discord bot when configured.

Description

  • Add a new management_ui.py Flask app that lists recent posts and exposes a POST /delete/<id> endpoint with Tailwind UI present in the template.
  • Extend dbInteraction.py with is_db_available(), fetchPosts(limit), and deletePost(post_id) and guard DB calls when a connection is not present.
  • Start the management UI from main.py in a daemon thread via a new start_management_ui() function and control it with TIKBOT_MANAGEMENT_UI_ENABLED and TIKBOT_MANAGEMENT_UI_PORT.
  • Add flask to requirements.txt so the UI dependency is declared.

Testing

  • Attempted to run the UI with python management_ui.py, which failed with ModuleNotFoundError: No module named 'flask' because the dependency was not available in the environment.
  • Attempted to install the dependency with pip install flask, which failed due to network/proxy restrictions in the sandbox (package fetch blocked).
  • No automated test suite (pytest) was run as part of this rollout due to the environment dependency issue.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant