Skip to content

feat: add useInaliaStatus for explicit running vs static mode detection#46

Merged
Barbapapazes merged 4 commits into
mainfrom
copilot/add-composable-for-talk-status
Apr 12, 2026
Merged

feat: add useInaliaStatus for explicit running vs static mode detection#46
Barbapapazes merged 4 commits into
mainfrom
copilot/add-composable-for-talk-status

Conversation

Copilot AI commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Today the addon’s runtime mode is only inferable indirectly through useInaliaTalk(), which makes simple “is this talk live or static?” checks awkward. This PR adds a dedicated composable for that distinction without changing the existing talk injection contract.

  • New status composable

    • Adds useInaliaStatus() as a small public API for reading addon mode directly.
    • Exposes:
      • isRunning
  • Public API export

    • Re-exports the new composable from the package entrypoint so it is available like the other composables.
  • Behavior

    • Reuses the existing injected talk value as the source of truth.
    • This keeps mode detection aligned with current runtime behavior:
      • injected talk present → running
      • no injected talk → static mode
  • Focused coverage

    • Adds composable-level tests for both configured/running and static/no-talk cases.
import { useInaliaStatus } from 'slidev-addon-inalia'

const { isRunning } = useInaliaStatus()

Agent-Logs-Url: https://github.com/Inalia-App/slidev-addon-inalia/sessions/7cb484f4-e7b0-47df-9173-d48ac9c54b65

Co-authored-by: Barbapapazes <45267552+Barbapapazes@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new composable to check talk running status Add useInaliaStatus for explicit running vs static mode detection Apr 11, 2026
@Barbapapazes Barbapapazes requested a review from Copilot April 11, 2026 22:34
Copilot AI requested a review from Barbapapazes April 11, 2026 22:34
@pkg-pr-new

pkg-pr-new Bot commented Apr 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/Inalia-App/slidev-addon-inalia@46

commit: 109a9df

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a small public composable to make “runtime mode” (running vs static) directly queryable, based on the existing injected talk value, and re-exports it from the package entrypoint.

Changes:

  • Added useInaliaStatus() composable returning isRunning, isStaticMode, and status.
  • Re-exported the new composable from index.ts.
  • Added unit tests covering running (talk provided) vs static (no talk provided) scenarios.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
composables/useInaliaStatus.ts New composable that infers mode from presence of injected talk.
index.ts Public API export for useInaliaStatus.
tests/composables/useInaliaStatus.spec.ts New composable-level tests for running/static behavior.

Comment thread tests/composables/useInaliaStatus.spec.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@Barbapapazes Barbapapazes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use comments and update tests.

Comment thread composables/useInaliaStatus.ts Outdated
Comment thread composables/useInaliaStatus.ts Outdated
@Barbapapazes Barbapapazes changed the title Add useInaliaStatus for explicit running vs static mode detection feat: add useInaliaStatus for explicit running vs static mode detection Apr 12, 2026
@Barbapapazes Barbapapazes marked this pull request as ready for review April 12, 2026 08:21
Agent-Logs-Url: https://github.com/Inalia-App/slidev-addon-inalia/sessions/9b10a0b6-8e23-40a6-8a11-16149df5c3e1

Co-authored-by: Barbapapazes <45267552+Barbapapazes@users.noreply.github.com>

Copilot AI commented Apr 12, 2026

Copy link
Copy Markdown
Contributor Author

Use comments and update tests.

Addressed in b80d97e. I applied the review feedback by reducing useInaliaStatus() to isRunning only and updated the composable tests to match. No UI changes were involved in this update.

Copilot AI changed the title feat: add useInaliaStatus for explicit running vs static mode detection Add useInaliaStatus for explicit running vs static mode detection Apr 12, 2026
Copilot AI requested a review from Barbapapazes April 12, 2026 08:24
@Barbapapazes Barbapapazes changed the title Add useInaliaStatus for explicit running vs static mode detection feat: add useInaliaStatus for explicit running vs static mode detection Apr 12, 2026
@Barbapapazes Barbapapazes merged commit b58d2d0 into main Apr 12, 2026
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.

Create a new composable to know if the talk is running or in static mode

3 participants