Skip to content

📩 fix: Stage URL Prompts Before Agent Submission - #16647

Merged
danny-avila merged 13 commits into
devfrom
lia/query-agent-submit
Oct 3, 2026
Merged

danny-avila merged 13 commits into
devfrom
lia/query-agent-submit

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

?agent_id=…&q=hi&submit=true left the composer blank while applying settings, then could send after a three-second fallback. Readiness compared URL settings with differently normalized conversation fields.

Stage the prompt immediately and show localized “Sending…” feedback. Submit once the requested settings match. On timeout, retain the draft with review guidance instead of sending to the wrong configuration. Typed, dictation, steering, and queue actions respect preparation; Stop and Cancel remain available.

How it works

prompt URL → route reconciliation → visible draft + normalized settings
  matched → guarded validation → one submission → URL cleanup
  timeout → retained draft + guidance → URL cleanup
  unrelated navigation → cancel without touching the destination
  later prompt URL → new request, old callbacks invalidated

Preserve explicit spec overrides, hidden-spec resolution, source/destination drafts, and project scope. Compare settings using endpoint-schema and conversation-builder semantics. Later prompt URLs work in the already-mounted composer, including “Start in a new chat” queue actions.

Type of change

  • Bug fix
  • Tests / tooling / CI

Testing

At eda94f7c165b067d9418ffc6bd48365d444b57b7:

  • 355 focused client tests: passed.
  • Client npx tsc --noEmit: passed.
  • PR-scoped static checks: passed, including lint, formatting, and import order.
  • Production client build: passed.
  • Chromium: three checks passed without retries. Saved-agent links send hi once; unapplied settings retain the visible prompt; queued messages start a fresh chat without also sending in the source chat.
  • Independent source review: complete at this head, no findings. Reviewer did not rerun runtime checks or independently rederive Git ancestry. Parent exact-head tests/browser checks and merge simulation passed.
  • CI: current-head typecheck, static checks, both Ubuntu test shards, and Lighthouse passed; remaining E2E lanes are running.

Three SPA-navigation integration controls failed before the fix. Coverage also includes normalization, hidden specs, draft ownership, cancellation, stale validation/timeout callbacks, and alternate submission paths.

Screenshots / recordings

Real-app screenshots and recordings were captured. GitHub asset upload rejected App authentication; no assets were uploaded or committed. Before capture was capacity-blocked.

Risk / compatibility

The existing settings timeout no longer auto-sends an unapplied configuration. The prompt remains available for review and manual send. Auto-submit policy, stored drafts, hidden specs, explicit settings, and project routing are preserved.

Checklist

  • Reviewed changes
  • Added regression coverage
  • Focused tests, typecheck, and static checks pass
  • No dependency or documentation changes required

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: ad085a65bf846d97576875d8404dc1b3d3d93a6d. Stages URL prompts immediately, exposes pending submission feedback, matches normalized settings, and retains drafts on setup timeout. Focused checks and CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 000ee5242723875141a438c609f38ce17d7fe344. Immediate URL drafts, localized pending feedback, normalized readiness, safe timeout recovery, and real composer regression coverage. Focused checks and CI are running.

@codegraph-librechat codegraph-librechat Bot added the 🗺️ Agent Chat UI codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) label Oct 2, 2026
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 000ee5242723875141a438c609f38ce17d7fe344. Local checks: 22 focused tests passed; client TypeScript passed; PR-scoped static checks passed. Local Lighthouse stopped before browser launch because dependencies were incomplete. Independent review and GitHub CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 1ad1bb666829182e1111e509ffd3464fe1153829. Fixed independent-review findings R1 (P1), R2 (P2), and R3 (P2). URL prompts survive saved-draft restoration; readiness uses the endpoint schema; menu-hidden specs retain server-side resolution. Regression controls failed on the earlier head. All 25 focused tests, client TypeScript, and staged static checks passed. Fresh independent review and CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 6894982e856a78fe845faa358fd606ef7c411207. Preserves explicit spec overrides and cancels URL-owned work on unrelated navigation. Includes config-wait, draft, project, validation, refusal, internal-switch, and error-guidance regressions. Independent review follows this invariant sweep. Focused tests passed; client TypeScript, static checks, and CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 6894982e856a78fe845faa358fd606ef7c411207. Local verification: 34 focused tests, client TypeScript, and PR-scoped static checks passed. Review dispositions: R1 (P1), R2 (P2), and R3 (P2) fixed in 1ad1bb666; R4 (P2) and R5 (P2) fixed in 6894982e8. No rejected findings. Fresh independent review and CI are running. Local browser recording is unavailable because dependency installation and worker capacity blocked launch.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 2231f0576473c1f3c2100a01284d2b7cec9d4c9d. Readiness matches retained preset tools. Pending URL work accepts the exact project rewrite produced by its requested switch, retains live project routing during cleanup, and rejects unrelated projects. Four corrected regression controls failed at the previous head. Focused tests passed; client TypeScript, static checks, and CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 22017533ad29132a04b33457b7f39704058e8b81. Preserves source drafts at the autosave boundary before staging URL prompts, including switch and debounce writes. Nullable endpoint metadata uses configured endpoint normalization. Five regression controls failed on the prior head. Focused tests, client TypeScript, and staged static checks passed. Independent review and CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: c54ca0538f71e25501d65cbf11b73bee0e1d7ef7. URL initialization waits for route reconciliation and the requested conversation. Retained prompts settle into their destination draft without overwriting departing source drafts. Covers loading records, long waits, non-submit, timeout, refused submission, round-trip restoration, and foreign-tab ownership. Focused tests passed. TypeScript, static checks, independent review, and CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: c54ca0538f71e25501d65cbf11b73bee0e1d7ef7. Local checks: 110 focused tests, client TypeScript, and staged static checks passed. Review findings R10 (P1) and R11 (P2) are fixed. All prior findings remain fixed; none rejected. Latest independent review and CI are running. Local Lighthouse/browser recording remain unavailable because local dependencies and Chromium are incomplete.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T02:12:50.314025Z c54ca05 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: c54ca0538f

ℹ️ 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".

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: a03b6337830d9309828b2a3639d016ba6eceb710. Expected conversation project is now separate from destination URL scope. Existing-project settings updates retain auto-submit ownership while unrelated project changes still cancel. Local focused tests, client TypeScript, and staged static checks passed. Fresh independent review and CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: a03b6337830d9309828b2a3639d016ba6eceb710. Local checks remain passing: 114 focused tests, client TypeScript, and PR-scoped static checks. Independent review is incomplete, not clean: the reviewer needs its own frozen-source worktree, and both creation attempts were blocked before execution by workspace capacity. No new findings reported. No code changes since this head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 7f56ed2bacf4d0e977ec409814cf6e8f28d17d94. Fixes the activity-prose E2E race: wait for the settled summary, reopen its intentionally collapsed panel, then check the retained intro. CI trace confirms the intro remained in stored content and both live identity/fade checks passed. No production behavior changed. Focused test TypeScript, lint, and formatting passed; fresh CI and independent review follow.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: ccbfcf717cd97ae673f327bd9deb0d9bfcf0a7c2. URL preparation holds microphone and recording Send controls and fences captured/late dictation sends, including the during-run route. Blocked takes retain words without replay; Stop and Cancel remain live. Local: 185 focused tests, client TypeScript, and staged static checks passed. Fresh independent review and CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: ccbfcf717cd97ae673f327bd9deb0d9bfcf0a7c2. Local checks: 185 focused tests, client TypeScript, full PR-scoped static checks, production client build, both activity-prose browser cases, and both real URL-entry browser checks passed. The saved-agent link sends hi exactly once; unapplied settings retain the visible draft without sending. Browser recordings were captured, but asset upload rejected App authentication. Independent review and remaining CI memory shards are pending.

@codegraph-librechat codegraph-librechat Bot added the 🗺️ Chat Features codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) label Oct 3, 2026
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 38e53ce6e56a5f5887e884ff6848bf8228ae353a. Holds live-run composer actions and captured steering/queue callbacks during URL preparation; Stop stays available. Integrates current dev without restoring its removed standalone steer button or composer tips. Focused checks and fresh CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 38e53ce6e56a5f5887e884ff6848bf8228ae353a. Local: 349 focused tests, client TypeScript, and PR-scoped static checks passed. R15 is fixed: during-run controls and captured composer callbacks cannot consume the URL-owned prompt while settings prepare, and Stop remains available. Current dev is integrated without restoring removed composer controls. Independent review, local Lighthouse, and fresh CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 38e53ce6e56a5f5887e884ff6848bf8228ae353a. Local: 349 focused tests, client TypeScript, PR-scoped static checks, production build, and both current-head URL-entry Chromium checks passed. Independent source review rechecked R1–R15 with no retained findings; overall reviewer status remains incomplete due unavailable lane-local runtime checks and capacity-blocked cleanup. All 15 findings are fixed; none rejected. CI Lighthouse, client TypeScript, and static checks passed. Remaining CI jobs are running with no failures reported.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 38e53ce6e56a5f5887e884ff6848bf8228ae353a. Remaining during-run bypass fixed and current dev integrated. Local: 349 focused tests, client TypeScript, PR-scoped static checks, production build, and two Chromium URL-entry checks passed. Independent source review found no remaining R1–R15 findings; reviewer overall status remains incomplete due lane-local runtime/cleanup limits. CI unit tests, typecheck, static checks, Vite and Lighthouse passed. Remaining memory E2E shards are running without reported failures. No merge or deployment.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: eda94f7c165b067d9418ffc6bd48365d444b57b7. The PR contains current dev with no merge conflict. Fixes the failing queue new-chat flow by processing later prompt URLs in the mounted composer and invalidating superseded validation/timeout callbacks. Local: 355 focused tests, client TypeScript, and staged static checks passed. Focused browser verification, independent review, and fresh CI are running.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: eda94f7c165b067d9418ffc6bd48365d444b57b7. The previously failing Start in a new chat queue scenario passed locally in Chromium without retries or assertion changes. Local: 355 focused tests, client TypeScript, PR-scoped static checks, and production build passed. GitHub reports mergeable; current dev is an ancestor. CI typecheck, static checks, and Lighthouse passed; remaining CI and independent review are pending.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: eda94f7c165b067d9418ffc6bd48365d444b57b7. Independent source review complete with no findings; R1–R16 rechecked, all fixed, none rejected. Reviewer did not rerun runtime checks or independently rederive ancestry. Parent exact-head verification: 355 focused tests, client TypeScript, PR-scoped static checks, production build, and three Chromium checks passed, including the formerly failing queue-new-chat scenario. GitHub and local merge simulation confirm no merge conflicts. CI: 22 passed, 3 skipped, four memory E2E shards running, no failures.

@danny-avila
danny-avila merged commit 1f195dc into dev Oct 3, 2026
30 checks passed
@danny-avila
danny-avila deleted the lia/query-agent-submit branch October 3, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Agent Chat UI codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Chat Features codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants