Skip to content

Add status filters and reviewed/engaged actions to the queue#15

Open
lamontacrook wants to merge 11 commits into
feat/pilot-applications-queuefrom
feat/queue-status-filters
Open

Add status filters and reviewed/engaged actions to the queue#15
lamontacrook wants to merge 11 commits into
feat/pilot-applications-queuefrom
feat/queue-status-filters

Conversation

@lamontacrook

Copy link
Copy Markdown
Contributor

What

Adds a filter bar and two new status actions to the Pilot Applications queue tool, built with Adobe Spectrum design tokens (no bundle changes).

Filters

A toggle pill bar with live counts, persisted to the URL (?filter=…):

  • Incompletesubmitted is false
  • Complete — submitted but not yet reviewed or engaged (the unprocessed bucket)
  • Reviewed — the new reviewed flag
  • Engaged — the new engaged flag

Combine logic: Incomplete/Complete are a status group (OR); Reviewed/Engaged each add an AND constraint.

Cards

  • Status badges (Incomplete / Complete / Reviewed / Engaged)
  • A date-submitted line (date-only values parsed in local time to avoid an off-by-one)
  • Per-card Reviewed and Engaged toggles, persisted through Fusion
  • The is-xsc-engaged form answer stays an informational chip (distinct from the engaged status)

Other

  • CSV export and the count line respect the active filter
  • Shared _busy guard so delete/review/engage mutations can't overlap

New API fields used

reviewed, engaged, date-submitted from the Fusion list response.

Fusion write contract (needs server support)

The toggles POST:

  • { review: "<key>", reviewed: <boolean> }
  • { engage: "<key>", engaged: <boolean> }

The Fusion scenario must handle these and return the updated reviewed/engaged on the next { share: "all" } for the state to round-trip.

Testing

Verified locally in aem up against a stubbed Fusion webhook: filters, counts, badges, date display, and both toggles (persist + reload) all work; lint passes for JS and CSS.

🤖 Generated with Claude Code

Adds a Spectrum-token filter bar to the Pilot Applications queue with
Incomplete / Complete / Reviewed / Engaged toggles (live counts, URL-persisted,
status group OR + flag AND combine logic). Complete means submitted but not yet
reviewed or engaged. Cards gain status badges, a date-submitted line, and per-card
Reviewed/Engaged toggles persisted through Fusion ({ review } / { engage }). CSV
export and the count line respect the active filter.

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

aem-code-sync Bot commented Jun 16, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

The "Show N more fields" inline expander is replaced by a "View all N fields"
button that opens a modal showing the full submission record (every populated
field, with long values like priority-justification wrapped). Closes via the X
button, backdrop click, or Escape. Removes the per-card expand state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat/queue-status-filters June 16, 2026 23:13 Inactive
reviewed, engaged, and submitted are represented by badges/toggles, so they no
longer appear as raw field rows in the details modal or the "View all N fields"
count. They remain in the CSV export.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat/queue-status-filters June 16, 2026 23:15 Inactive
The Reviewed/Engaged toggles now POST { key, reviewed } / { key, engaged } to a
dedicated Fusion status webhook (STATUS_ENDPOINT), separate from the list/delete
endpoint. The endpoint is injectable via the statusEndpoint property so the local
dev harness can stub it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat/queue-status-filters June 16, 2026 23:22 Inactive
queue.html now mounts a stubbed dev harness (sample data + in-memory Fusion
webhooks) when opened with ?dev on non-prod environments, so the UI can be
previewed on plain localhost without DA sign-in. Without the flag (or on
aem.live) it loads the real tool via init() as before. Replaces the separate
queue-dev.html / __dev-data.json with queue-dev.js (fictional sample data).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat-queue-status-filters June 16, 2026 23:28 Inactive
The tool failed to load inside Document Authoring because it read sdk.token
(undefined in the current SDK) and sdk.context.org/repo (often empty in the
embedded app). Mirror the working inventory tool instead:

- authenticate config reads via sdk.actions.daFetch (da-config now takes daFetch)
- resolve org/repo from the embedded-browser URL (parseDaOrgRepoFromEmbeddedBrowsers)
- self-boot from a <script src> in queue.html with a boot() that renders errors,
  and handles the ?dev sample-data mode on non-prod

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat/queue-status-filters June 16, 2026 23:35 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat-queue-status-filters June 16, 2026 23:35 Inactive
Drops queue-dev.js, the ?dev branch in boot(), the ENV import, and the dev
banner style. queue.html keeps the standard self-boot (<script src>) and loads
only the real tool.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat/queue-status-filters June 16, 2026 23:56 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat-queue-status-filters June 16, 2026 23:56 Inactive
Adds a Sort dropdown to the queue toolbar with four options: Date newest/oldest
first and Account name A–Z / Z–A. Applied to the filtered set, URL-persisted via
?sort=, defaults to newest first. Records without a date sort to the end in both
directions; ties keep queue order (stable). Refactors date parsing into a shared
submittedTimestamp() helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat/queue-status-filters June 17, 2026 00:05 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat-queue-status-filters June 17, 2026 00:05 Inactive
The flags now count only a real boolean true (or the string "true"), not "yes".
A "Yes" value (e.g. leaking from the is-xsc-engaged answer) was being read as
engaged, marking records that aren't actually engaged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat/queue-status-filters June 17, 2026 01:21 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat-queue-status-filters June 17, 2026 01:21 Inactive
Toggling a flag now POSTs and, on success, applies a local override to that card
instead of re-fetching the whole queue. The card flips after the POST confirms
(per-button busy state, no loading modal), toggles run concurrently per card, and
a card that no longer matches the active filter drops out immediately. Overrides
clear on the next Refresh/delete reload, when fresh server data takes over.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat/queue-status-filters June 17, 2026 01:29 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to feat-queue-status-filters June 17, 2026 01:29 Inactive
Label only — the form is complete and ready to review. The filter key (complete),
logic, CSS classes, and ?filter=complete URLs are unchanged.

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