Repository navigation
Replies: 2 comments 3 replies
|
By repo i meant project in T3Code. Not an actual git repo |
|
Note Outdated: this describes the first version (a I implemented a small version of the cleanup half on a branch: hagz0r/t3code@feat/run-actions-on-settle. Per CONTRIBUTING, I'd like a maintainer to confirm the direction and scope before I open a PR. Scope (smaller than the original post)
Not included: Focused tests cover running settle actions in order and skipping automatic settlement. Is this direction and scope OK to open as a PR? |








Uh oh!
There was an error while loading. Please reload this page.
It would be useful to support repository-level lifecycle hooks for threads — essentially constructors and destructors tied to a thread’s lifecycle.
The main use case is automatic environment setup and cleanup.
For example, when a thread starts:
And when the thread becomes settled:
Right now, desktop workflows can accumulate state and artifacts that need to be cleaned up manually after a thread is finished. Lifecycle hooks would make repo workflows easier to keep isolated and reproducible.
Possible config:
Manual vs automatic settling
Threads can become settled either manually or automatically.
For manual settle, running on_settled immediately is predictable since the user explicitly initiated the transition.
For automatic settle, cleanup hooks should probably not execute silently, since they may perform destructive actions such as deleting build artifacts, removing dependencies, closing DB connections, or tearing down temporary resources.
If confirm_on_auto_settle is enabled, the desktop app could show a confirmation modal before executing the destructor:
This thread was automatically settled and has cleanup hooks configured. Run cleanup now?
The setting should be configurable per repo, so users who trust their hooks can disable the confirmation.
Potentially useful hooks:
The main feature is a reliable destructor mechanism tied to the settled state, with explicit handling for automatic settling so cleanup does not unexpectedly destroy useful state.
All reactions