Skip to content

feat(audience): print job link when assigning to audience#648

Merged
LinoGiger merged 1 commit into
mainfrom
feat(audience)/print-job-link-on-assign
Jul 3, 2026
Merged

feat(audience): print job link when assigning to audience#648
LinoGiger merged 1 commit into
mainfrom
feat(audience)/print-job-link-on-assign

Conversation

@RapidPoseidon

Copy link
Copy Markdown
Contributor

What

RapidataAudienceBase.assign_job() now prints the job's dashboard link after creating the job, mirroring how RapidataOrder.run() prints the order link.

Why

Orders already give you two nudges: creating an order prints a preview QR + dashboard link, and run() prints the live order link. Job definitions already had the first half (creating a definition prints the preview QR + dashboard link via _qr_preview), but assigning a job to an audience — the analog of running an order — printed nothing. This closes that gap so the job flow matches the order flow.

Step Order Job
Create create_*_order → QR + link create_*_job_definition → QR + link
Start run() → order link assign_job()job link (new)

Change

One line (plus a managed_print import) in audience/_audience_base.py:

Job '<name>' is now viewable under: https://app.<env>/audiences/<audience_id>/job/<job_id>

Wording matches run() verbatim, and managed_print respects silent_mode.

Checks

  • uv run black src/rapidata/rapidata_client — clean
  • uv run pyright src/rapidata/rapidata_client — 0 errors, 0 warnings

🔗 Session: https://session-e5579afc.poseidon.rapidata.internal/

assign_job now prints the job's dashboard link, mirroring how
RapidataOrder.run() prints the order link. This completes the parallel
with orders: creating a job definition already prints the preview QR +
dashboard link (like creating an order), and assigning the job to an
audience now surfaces the live job link (like running an order).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: lino <lino@rapidata.ai>
@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review

Small, well-scoped change: assign_job() now prints the job's dashboard link via managed_print, mirroring RapidataOrder.run(). I checked the mechanics rather than running a full multi-angle scan since the diff is only 4 lines.

Verified correct:

  • job.job_details_page and job.name are real attributes set in RapidataJob.__init__ (rapidata_job.py:56,63), so no attribute errors.
  • managed_print respects silent_mode (config/managed_print.py:4-6), consistent with how it's used elsewhere (rapidata_job.py:239, :315, :324, rapidata_order.py:257).
  • Message wording matches RapidataOrder.run()'s "is now viewable under" phrasing verbatim, per the PR's stated intent.
  • Import addition (managed_print) is correctly scoped and used.

No correctness, security, or performance issues found.

Minor note (pre-existing gap, not introduced by this PR): there's no test coverage for RapidataAudienceBase.assign_job() at all — I couldn't find any tests exercising the audience module's job assignment path. Not a blocker for this one-line addition, but worth flagging if a future audience-related PR wants to shore up coverage.

Nothing else to flag — this looks good to merge.

@LinoGiger LinoGiger marked this pull request as ready for review July 3, 2026 09:55
@LinoGiger LinoGiger self-requested a review as a code owner July 3, 2026 09:55
@LinoGiger LinoGiger merged commit 919631e into main Jul 3, 2026
2 checks passed
@LinoGiger LinoGiger deleted the feat(audience)/print-job-link-on-assign branch July 3, 2026 09:55
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.

2 participants