Skip to content

[SDK-387] automatically start and end sessions#827

Open
lposen wants to merge 18 commits intoemb-ootb/masterfrom
loren/embedded/SDK-387-start-end-session-with-app-visibility
Open

[SDK-387] automatically start and end sessions#827
lposen wants to merge 18 commits intoemb-ootb/masterfrom
loren/embedded/SDK-387-start-end-session-with-app-visibility

Conversation

@lposen
Copy link
Contributor

@lposen lposen commented Mar 19, 2026

🔹 JIRA Ticket(s) if any

✏️ Description

Automatically start and end sessions when components are showing

Testing

  1. Make sure the app is properly set up. Check out the install instructions in example/README.md for me details.
  2. Run the example app. Check out the run instructions in example/README.md for me details.
  3. Open logcat or xcode, depending which you are testing on
  4. Login to the app
  5. Click on the embedded tab at the bottom
  6. startEmbeddedSession should show in the logs
  7. Click on any other tab at the bottom
  8. endEmbeddedSession should show in the logs

@github-actions
Copy link

github-actions bot commented Mar 19, 2026

Lines Statements Branches Functions
Coverage: 68%
68.67% (513/747) 54.75% (190/347) 65.23% (167/256)

@qltysh
Copy link

qltysh bot commented Mar 19, 2026

Qlty

Coverage Impact

⬆️ Merging this pull request will increase total coverage on emb-ootb/master by 1.19%.

Modified Files with Diff Coverage (7)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
src/core/classes/Iterable.ts100.0%
Coverage rating: A Coverage rating: A
src/embedded/components/IterableEmbeddedView.tsx75.0%53
New file Coverage rating: A
src/embedded/hooks/useWarnIfOutsideEmbeddedSession.ts100.0%
New file Coverage rating: A
src/embedded/components/EmbeddedSessionManager.tsx100.0%
New file Coverage rating: A
...onents/EmbeddedSessionDevWarning/EmbeddedSessionDevWarning.tsx100.0%
New file Coverage rating: A
src/embedded/context/EmbeddedSessionContext.ts100.0%
New file Coverage rating: A
.../EmbeddedSessionDevWarning/EmbeddedSessionDevWarning.styles.ts100.0%
Total96.7%
🤖 Increase coverage with AI coding...

In the `loren/embedded/SDK-387-start-end-session-with-app-visibility` branch, add test coverage for this new code:

- `src/embedded/components/IterableEmbeddedView.tsx` -- Line 53

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@qltysh
Copy link

qltysh bot commented Mar 19, 2026

❌ 1 blocking issue (4 total)

Tool Category Rule Count
eslint Lint tsdoc-code-span-missing-delimiter: The code span is missing its closing backtick 1
qlty Structure Function with high complexity (count = 9): Embedded 2
qlty Structure Function with many returns (count = 6): IterableEmbeddedView 1

</EmbeddedSessionManager>
</ScrollView>
</SafeAreaView>
);
Copy link

Choose a reason for hiding this comment

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

Function with high complexity (count = 9): Embedded [qlty:function-complexity]

@lposen lposen marked this pull request as ready for review March 19, 2026 21:43
}

/**
* Banner when embedded views are not wrapped in EmbeddedSessionManager`.
Copy link

Choose a reason for hiding this comment

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

tsdoc-code-span-missing-delimiter: The code span is missing its closing backtick [eslint:tsdoc/syntax]

);
}

return Cmp ? <Cmp {...props} /> : null;
Copy link

Choose a reason for hiding this comment

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

Found 2 issues:

1. Function with many returns (count = 6): IterableEmbeddedView [qlty:return-statements]


2. Function with high complexity (count = 7): IterableEmbeddedView [qlty:function-complexity]

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