Skip to content

Bugfix/2.0.1#1001

Merged
tunjid merged 7 commits intoreleasesfrom
bugfix/2.0.1
Feb 17, 2026
Merged

Bugfix/2.0.1#1001
tunjid merged 7 commits intoreleasesfrom
bugfix/2.0.1

Conversation

@tunjid
Copy link
Owner

@tunjid tunjid commented Feb 17, 2026

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @tunjid, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines core data generation mechanisms by centralizing TID logic within the RecordKey class, enhancing consistency across the application. Concurrently, it delivers a more polished user experience in key areas like the Graze Editor and Settings, through refined UI interactions and sophisticated animation handling, making the application feel more responsive and intuitive.

Highlights

  • TID Generation Refactoring: The logic for generating and encoding Time-ordered IDs (TIDs) has been centralized. The encode function and its related constants were moved from TidGenerator to the RecordKey value class, which now also includes a generate() function for creating AT Protocol TIDs.
  • Graze Editor UI/State Enhancements: The Graze Editor received updates to its string resources, ViewModel, and UI components. The Action.Metadata was simplified, RecordKey generation now uses the new RecordKey.generate(), and the top bar actions and title are more interactive, allowing for feed metadata editing through a new sheet state.
  • Account Switching Animation Improvements: The Settings screen's account switching functionality was significantly refactored to use AnimatedContent and a new AccountSwitchState class for smoother, more controlled animations. Shared element transitions for user avatars were updated to use a consistent key from UiTokens.
  • Composable State Management: Several composables, particularly in the Settings and Graze Editor features, have been refactored to manage state more effectively, reducing internal state and passing callbacks for actions, leading to a more unidirectional data flow and improved testability.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • data/core/src/commonMain/kotlin/com/tunjid/heron/data/utilities/TidGenerator.kt
    • Removed encode function and its companion object.
    • Updated TidGenerator to use RecordKey.encode for base32 encoding.
    • Imported RecordKey.
  • data/models/src/commonMain/kotlin/com/tunjid/heron/data/core/types/RecordKey.kt
    • Added a companion object to RecordKey.
    • Moved the encode function from TidGenerator to RecordKey.companion object.
    • Implemented a new generate() function for creating AT Protocol TIDs within RecordKey.companion object.
    • Added necessary imports for ExperimentalAtomicApi, Random, Clock, and ExperimentalTime.
  • feature/graze-editor/src/commonMain/composeResources/values/strings.xml
    • Updated the string resource graze_editor from "Graze Editor" to "Create a Graze feed".
    • Added a new string resource no_display_name with the value "No feed name set".
  • feature/graze-editor/src/commonMain/kotlin/com/tunjid/heron/graze/editor/GrazeEditorViewModel.kt
    • Simplified updateMetadataMutations by removing the Action.Metadata.SetRecordKey branch.
    • Consolidated metadata updates into a single copy operation for grazeFeed.
  • feature/graze-editor/src/commonMain/kotlin/com/tunjid/heron/graze/editor/State.kt
    • Changed GrazeFeed.Pending initialization to use RecordKey.generate() for recordKey.
    • Refactored Action.Metadata from a sealed class with SetRecordKey and FeedGenerator to a single data class Metadata.
  • feature/graze-editor/src/commonMain/kotlin/com/tunjid/heron/graze/editor/di/Bindings.kt
    • Imported State and EditFeedInfoSheetState.
    • Imported rememberEditFeedInfoSheetState.
    • Removed unused imports blockClickEvents and ifTrue.
    • Added rememberEditFeedInfoSheetState to PoppableDestinationTopAppBar's topBar lambda.
    • Modified Title composable call to include onTitleClicked callback.
    • Refactored TopBarActions to pass onEditClicked, onSaveClicked, and onDeleteClicked callbacks instead of feedGenerator and a generic actions lambda.
    • Added a private extension function editFeed for EditFeedInfoSheetState.
  • feature/graze-editor/src/commonMain/kotlin/com/tunjid/heron/graze/editor/ui/ScreenTitle.kt
    • Added imports for clickable, MutableInteractionSource, CircleShape, ripple, and clip.
    • Imported no_display_name string resource.
    • Modified the Title composable to accept an onTitleClicked lambda.
    • Made the AnimatedContent modifier clickable with a ripple effect.
    • Swapped the display order of graze_editor and no_display_name in the Text composables.
  • feature/graze-editor/src/commonMain/kotlin/com/tunjid/heron/graze/editor/ui/TopBarActions.kt
    • Removed imports related to FeedGenerator, RecordKey, Action, and SelectTextSheetState.
    • Updated TopBarActions signature to accept onEditClicked, onSaveClicked, and onDeleteClicked lambdas.
    • Removed internal editRecordKeySheetState and editFeedInfoSheetState.
    • Updated AppBarButton for save action to use onSaveClicked.
    • Removed DropdownMenuItem for "edit record key".
    • Updated DropdownMenuItem for "edit feed" to use onEditClicked.
    • Updated DropdownMenuItem for "delete feed" to use onDeleteClicked.
  • feature/home/src/commonMain/kotlin/com/tunjid/heron/home/ui/EditableTimelineState.kt
    • Modified rememberEditableTimelineState to use a remember key based on timelines.joinToString(transform = Timeline.Home::sourceId).
  • feature/settings/src/commonMain/kotlin/com/tunjid/heron/settings/SettingsScreen.kt
    • Added imports for Spring, spring, Alignment, and animate.
    • Removed import for AccountSwitchingTransitionLayer.
    • Changed the root Box to a Column.
    • Updated AccountSwitchingItem to pass switchPhase, switchingSession, and modifier.
    • Wrapped ContentAndMediaItem, FeedbackItem, OpenSourceLibrariesItem, and SignOutItem in an if (state.switchPhase == AccountSwitchPhase.IDLE) block.
    • Removed the direct call to AccountSwitchingTransitionLayer.
  • feature/settings/src/commonMain/kotlin/com/tunjid/heron/settings/SettingsViewModel.kt
    • Removed the emit block that reset switchPhase and switchingSession after a successful session switch.
  • feature/settings/src/commonMain/kotlin/com/tunjid/heron/settings/ui/AccountSwitchingItem.kt
    • Added imports for AnimatedContent, AnimatedVisibilityScope, and Stable.
    • Removed import for background and rememberSaveable.
    • Imported UiTokens.
    • Updated AccountSwitchingItem signature to include switchPhase and switchingSession.
    • Refactored the else branch to use AnimatedContent for switchingSession.
    • Introduced rememberAnimationData and AccountSwitchState to manage animation state.
    • Modified MultiSessionLayout to accept animatedVisibilityScope and accountSwitchState.
    • Changed MultiSessionLayout to be private.
    • Updated ExpandButton and SessionSummaries composables to use AccountSwitchState.
    • Replaced PaneStickySharedElement with AsyncImage and sharedElement modifier for avatars.
    • Changed AccountSwitchingTransitionLayer to be private and updated its signature to accept modifier, animatedVisibilityScope, and a non-nullable session.
    • Updated AccountSwitchingTransitionLayer to use UiTokens.SignedInUserAvatarSharedElementKey and sharedElement modifier.
  • scaffold/src/commonMain/kotlin/com/tunjid/heron/scaffold/scaffold/PaneTopAppBar.kt
    • Updated SignedInUserAvatarSharedElementKey to UiTokens.SignedInUserAvatarSharedElementKey.
    • Removed unused private constants BackArrowEnter, BackArrowExit, and SignedInUserAvatarSharedElementKey.
  • ui/core/src/commonMain/kotlin/com/tunjid/heron/ui/Tokens.kt
    • Added SignedInUserAvatarSharedElementKey constant.
Activity
  • The pull request introduces a significant refactoring of TID generation and encoding, moving the logic to a more appropriate RecordKey class.
  • UI components in the Graze Editor and Settings screens have been updated to improve user experience and leverage modern Compose animation features, specifically shared element transitions for account switching.
  • State management for UI elements has been streamlined, reducing internal state in composables and promoting a more unidirectional data flow.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several refactorings and bug fixes. Key changes include centralizing the Time-ordered Identifier (TID) generation logic within the RecordKey type, which is a good move for code cohesion. The UI for account switching in the settings has been significantly refactored for better encapsulation and animation. Other changes simplify component APIs and improve state management in composables. I've identified a potential bug in the SettingsViewModel where state isn't reset after an account switch, and an instance of code duplication in the TID generation logic. Overall, the changes are positive and improve the codebase's maintainability.

@tunjid tunjid merged commit 3356c92 into releases Feb 17, 2026
6 checks passed
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