diff --git a/.agent/workflows/gitbucket_api.md b/.agent/workflows/gitbucket_api.md index 0fa4d21..2ad4034 100644 --- a/.agent/workflows/gitbucket_api.md +++ b/.agent/workflows/gitbucket_api.md @@ -117,6 +117,18 @@ #### Authentication Retrieve login credentials (username/password) from the **Snippet Vault** (`.env.ai`) using the `git clone` or raw fetch methods described above before attempting any browser-based login. +#### UI Selector Cheat Sheet +Use these stable selectors to avoid re-analyzing the DOM: +- **Login Page**: + - Username: `input[name="userName"]` + - Password: `input[name="password"]` + - Submit: `input[type="submit"]` +- **Issue Page**: + - Comment Area: `textarea[name="content"]` + - Close Issue Button: `.btn.btn-danger` (sometimes labeled "Close issue") + - Comment Button: `.btn.btn-success` (sometimes labeled "Comment") + - Issue Status Label: `.label-success` (Open), `.label-important` (Closed) + ## Security Best Practices - **Private Only**: Never store credentials in "Public" or "Secret" snippets. - **Rotation**: Update the snippet regularly; agents will automatically pick up the new values.