Skip to content

[codex] fix AgentProf QA UX issues - #25

Draft
tjdonley wants to merge 1 commit into
mainfrom
codex/agentprof-qa-ux-fixes
Draft

tjdonley wants to merge 1 commit into
mainfrom
codex/agentprof-qa-ux-fixes

Conversation

@tjdonley

Copy link
Copy Markdown
Owner

Summary

  • Add friendly locked-store handling so concurrent DuckDB access exits with an actionable AgentProf message instead of a traceback.
  • Fix the generated multi-agent waste SVG so long agent names no longer clip inside the Agents detected card.
  • Update the checked-in demo SVG and tests for the new behavior.

Why

The full feature/user-story QA pass found two user-facing defects: raw DuckDB lock tracebacks during concurrent CLI access, and clipped text in the report visual artifact. Both are logistical/UX issues that make otherwise-correct behavior feel broken.

Validation

  • uv run pytest -> 139 passed
  • Manual own-data workflow: init, doctor, import, normalize, analyzers, cost ledger, report generate/list/show/stats
  • Demo workflow: agentprof demo --dir outputs/.../demo-smoke
  • Real DuckDB lock smoke: held a store connection, ran agentprof store stats, confirmed exit code 2 with no traceback
  • SVG visual QA: regenerated demo SVG and rasterized it to confirm no clipping

Note: local QA tracker artifacts remain under outputs/ in the workspace and were intentionally left out of the source PR because they include transient demo databases and rendered previews.

@tjdonley
tjdonley marked this pull request as ready for review August 12, 2026 16:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f13465be01

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread agentprof/cli.py
)

DuckDBStore(config.store.path).reset()
_store_call(lambda: DuckDBStore(config.store.path).reset())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Acquire the store lock before deleting database files

When agentprof store reset runs concurrently with another process holding the database, this wrapper cannot provide the promised lock error because DuckDBStore.reset() unlinks the database before attempting connect(). On POSIX, unlinking a locked file succeeds, so reset creates a new database while the other process continues using the now-unlinked old database, silently losing any subsequent work; on platforms that reject the unlink, the uncaught PermissionError can still produce a traceback. Make reset detect or coordinate the lock before removing either database file.

Useful? React with 👍 / 👎.

Comment thread agentprof/cli.py
Comment on lines +332 to +333
except StoreConnectionError as exc:
_exit_store_locked(exc)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Route doctor’s connection through lock translation

When another process locks the store, this handler is unreachable because DuckDBStore.migrations() opens the database directly with duckdb.connect(..., read_only=True) rather than DuckDBStore.connect(). The resulting duckdb.IOException falls into the generic workspace-error branch, so agentprof doctor does not emit the newly added store-locked message or retry guidance. Have migrations() use the translated connection path or translate its exception directly.

Useful? React with 👍 / 👎.

Comment on lines +864 to +865
return _truncate_svg_label(names[0], max_chars=26)
return _truncate_svg_label(f"{names[0]} +{count - 1} more", max_chars=26)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bound SVG labels by rendered width

For agent names containing wide glyphs, such as a 26-character uppercase name, this limit still permits text wider than the roughly 166 pixels available inside the card. Because proportional fonts do not map characters to a fixed width, the change does not reliably prevent the clipping it is intended to fix. Use an SVG clipping/text-length mechanism or a conservative width-aware truncation instead of accepting every label up to 26 characters.

Useful? React with 👍 / 👎.

@tjdonley
tjdonley marked this pull request as draft August 12, 2026 16:14
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