Skip to content

Update dashboard hints for task management#309

Open
tildesrc wants to merge 1 commit into
mainfrom
setup-copy
Open

Update dashboard hints for task management#309
tildesrc wants to merge 1 commit into
mainfrom
setup-copy

Conversation

@tildesrc

Copy link
Copy Markdown
Contributor

No description provided.

tildesrc pushed a commit that referenced this pull request Jul 13, 2026
… storage

Build on #308's GH_TOKEN support with the operator-UX improvements:

* Open with two bulleted lists — what we know about the repo (name +
  local-checkout vs GitHub-remote, classified from the git URL) and what its
  setup entails (Claude credential always; GH_TOKEN for GitHub repos), each
  marked needed / already-configured / not-needed.
* GH_TOKEN acquisition now combines both paths: reuse a GH_TOKEN already in the
  environment (#308's fast path) when present, else authenticate interactively
  via `gh auth login` + `gh auth token`. Offers to replace an existing
  GH_TOKEN, and guides the operator when `gh` isn't installed.
* DRY the env-file write: generalize `store_oauth_token` into
  `store_env_token <VAR> <token> <file>`, the single comment-out/replace/append
  implementation both tokens share (retires the append-only `append_env_var`);
  `store_oauth_token` stays as a thin wrapper.
* Turn the closing summary into a bullet-per-step list.
* Fold in #309's hint wording (detach reassurance + actionable drop).

The opening summary needs the repo's name, so the ShellRunner now also exports
PANOPTICON_REPO_NAME (alongside #308's PANOPTICON_GIT_URL), passed through by
the spawner from the repo record.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tildesrc added a commit that referenced this pull request Jul 14, 2026
…orage (#310)

* feat(setup-repo): repo-aware summaries + gh-login GH_TOKEN, DRY token storage

Build on #308's GH_TOKEN support with the operator-UX improvements:

* Open with two bulleted lists — what we know about the repo (name +
  local-checkout vs GitHub-remote, classified from the git URL) and what its
  setup entails (Claude credential always; GH_TOKEN for GitHub repos), each
  marked needed / already-configured / not-needed.
* GH_TOKEN acquisition now combines both paths: reuse a GH_TOKEN already in the
  environment (#308's fast path) when present, else authenticate interactively
  via `gh auth login` + `gh auth token`. Offers to replace an existing
  GH_TOKEN, and guides the operator when `gh` isn't installed.
* DRY the env-file write: generalize `store_oauth_token` into
  `store_env_token <VAR> <token> <file>`, the single comment-out/replace/append
  implementation both tokens share (retires the append-only `append_env_var`);
  `store_oauth_token` stays as a thin wrapper.
* Turn the closing summary into a bullet-per-step list.
* Fold in #309's hint wording (detach reassurance + actionable drop).

The opening summary needs the repo's name, so the ShellRunner now also exports
PANOPTICON_REPO_NAME (alongside #308's PANOPTICON_GIT_URL), passed through by
the spawner from the repo record.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(shell-runner): strip comments so the spawn command fits tmux's imsg cap

The setup-repo UX changes grew the assembled shell command to ~18 KB. tmux
sends a whole `new-session` command (pane shell command included) to its server
over imsg, which caps a single message at MAX_IMSGSIZE (16 KiB) — so the spawn
failed with `new-session ... returned non-zero exit status 1` before the script
ever ran.

Strip whole-line comments and blank lines from the assembled command at spawn
time (they're pure bulk at runtime; the source files keep their comments). This
brings setup-repo's command from ~18 KB to ~10 KB, well under the cap, and gives
every shell workflow headroom. Only lines that are entirely a comment or blank
are dropped — inline/trailing comments and code are untouched.

Adds a tmux-free regression test asserting the assembled setup-repo command has
no whole-line comments and stays under 16 KiB (the pytest CI job has no tmux, so
the integration spawn test is skipped there — this guards it without one).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(setup-repo): drop the gh auth login fallback for GH_TOKEN

Keep only the reuse-a-GH_TOKEN-from-the-environment path: when the operator's
env has a GH_TOKEN, offer to write it into the env-file (through the shared
store_env_token, so an existing one is replaced); when it doesn't, guide them to
add one by hand rather than minting one interactively. Removes collect_gh_token
and the `gh auth login`/`gh auth token` flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(setup-repo): open with the credentials goal + why

Begin the flow with a short intro stating the goal — collect persistent
credentials (a Claude token, and a GH_TOKEN for GitHub repos) stored in the
repo's env-file so Claude can use them inside task containers — and the reason:
the agent runs on its own dedicated credentials instead of hijacking the
operator's.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(setup-repo): trustworthy credential flow — adopt/paste/mint, env-file truth

Address the self-review of the onboarding flow:

Correctness
* "Configured" is now checked against the env-file (env_file_has_var), not the
  sourced env. A Claude token that lives only in the operator's shell is no
  longer mis-reported as configured (the container gets --env-file, not the host
  env), which previously meant "done" but a container that 401s.

Consent / control
* Every adopt prompt defaults to No ([y/N]); flipped GH adoption off [Y/n].
* Adopting a token from the environment shows a masked tail (last 4) so the
  operator confirms which token — new mask_last4 helper.
* Only offers to adopt a var that isn't already the env-file's own.

Fast path for an already-authenticated operator
* Each credential can be adopted from the environment or pasted inline; Claude
  falls back to `claude setup-token`. Symmetric Claude/GH via a shared
  store_token. No more detach → drop → hand-edit → re-run to bring your own.

Copy
* New opener: what happens + that you stay in control (per-repo tokens, "not
  your personal session", opt out by editing the env-file) — drops the
  "collect persistent credentials"/"hijacking" register.
* "collect" → "mint / set up" throughout; agent-neutral wording.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Panopticon Agent <agent@panopticon.local>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant