Skip to content

App Builder - Add session-based message pagination#3

Merged
eshurakov merged 1 commit intomainfrom
eshurakov/app-builder-message-paging
Feb 4, 2026
Merged

App Builder - Add session-based message pagination#3
eshurakov merged 1 commit intomainfrom
eshurakov/app-builder-message-paging

Conversation

@eshurakov
Copy link
Copy Markdown
Contributor

Summary

  • Show only the last 2 user sessions initially in the App Builder chat
  • Add "Load earlier messages" button to progressively reveal older sessions
  • Group messages by user sessions (user message + subsequent AI responses) to prevent cutting conversations mid-turn

This improves UX for long conversations by keeping the chat UI manageable while preserving conversation context.

Screenshot 2026-02-02 at 12 29 21

@RSO RSO self-requested a review February 4, 2026 10:10
@eshurakov eshurakov merged commit 5a68220 into main Feb 4, 2026
10 of 11 checks passed
@eshurakov eshurakov deleted the eshurakov/app-builder-message-paging branch February 4, 2026 10:22
alex-alecu added a commit that referenced this pull request Mar 18, 2026
## Summary

Follow-up for #927

The incremental review feature flag was evaluated with a hardcoded
`'server-config-fetch'` distinctId instead of the actual owner's userId,
making per-user/org targeting in PostHog non-functional. This meant the
flag always resolved the same way regardless of which user or org
triggered the review. Additionally, the entire incremental review
decision path had zero logging, making it impossible to debug from Axiom
why a review used full mode instead of incremental.

This PR passes `owner.userId` to the flag evaluation (matching the
pattern already used for the PR gate flag in the same file) and adds log
lines at each decision point: flag evaluation result, previous review
lookup outcome, and the prompt workflow gate that selects incremental vs
full mode.

## Verification

- [x] `pnpm typecheck` — passes cleanly across all workspace projects

## Visual Changes

N/A

## Reviewer Notes

- The flag fix on line 325 mirrors the existing correct pattern at line
410 (`isFeatureFlagEnabled('code-review-pr-gate', owner.userId)`).
- `owner.userId` is always present — it's a required field in both
variants of the `OwnerSchema` discriminated union. For orgs, it's a
synthetic bot ID like `'bot-code-review-{orgId}'`.
- Logging uses `logExceptInTest` consistently and truncates SHAs to 8
characters, matching existing conventions.
- Issue #3 from the investigation (rapid push cancellation preventing
incremental base) is intentionally not addressed here — it's an
architectural design constraint that needs product discussion.
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