Skip to content

feat: full-width mobile edit buttons and add Air live-reload#46

Merged
drywaters merged 5 commits intomainfrom
feat/mobile-edit-buttons-fullwidth-and-air
Feb 20, 2026
Merged

feat: full-width mobile edit buttons and add Air live-reload#46
drywaters merged 5 commits intomainfrom
feat/mobile-edit-buttons-fullwidth-and-air

Conversation

@drywaters
Copy link
Copy Markdown
Collaborator

@drywaters drywaters commented Feb 20, 2026

Summary

  • Make edit page action buttons stretch to fill full row width on mobile (two per row, using flex-1) while preserving natural button sizing on desktop (sm:flex-initial)
  • Center Cancel button text on mobile via justify-center
  • Add Air live-reload config (.air.toml) and make dev target so templ/Tailwind/Go changes auto-rebuild and restart the server

Test plan

  • Run make dev and verify server starts with live-reload
  • Edit a .templ file and confirm the server auto-restarts
  • On mobile viewport (~375px): verify edit page buttons display two per row, each stretching to fill the row width
  • On desktop viewport: verify Re-fetch/Re-summarize are left-aligned and Cancel/Save Changes are right-aligned at natural sizes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a local live-reload dev server and a project build/runtime configuration to streamline local development.
  • Chores

    • Ignore temporary build output directory.
    • Makefile updated with a dev target and removal of a local include.
  • Style

    • Improved responsive layouts and button sizing across pages, added explicit action labels (e.g., "Save Entry", "Save Changes"), and refined loading indicator structure, behavior, and positioning.

Make edit page action buttons stretch to fill row width on mobile
(two per row) while keeping natural sizing on desktop. Also add Air
config and `make dev` target for live-reload during development.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @drywaters, 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 enhances the user experience on mobile devices by making edit page action buttons more responsive and introduces a significant developer experience improvement by integrating Air for live-reloading, streamlining the development workflow for Go, Templ, and Tailwind CSS.

Highlights

  • Mobile UI/UX Improvement: Implemented full-width mobile edit buttons on the entry edit page, ensuring two buttons per row and proper sizing on desktop. The 'Cancel' button text is now centered on mobile viewports.
  • Developer Experience Enhancement: Introduced Air live-reload configuration to enable automatic rebuilding and server restarts for Go, Templ, and Tailwind CSS changes during development.
  • New Development Target: Added a make dev target to simplify starting the live-reload development server.

🧠 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
  • .air.toml
    • Added Air configuration for live-reloading Go, Templ, and CSS files.
    • Configured pre-build commands for templ generate and tailwindcss.
  • .gitignore
    • Added tmp/ directory to the ignore list.
  • Makefile
    • Added dev target to run air for live-reloading.
    • Updated .PHONY list to include dev.
  • internal/ui/pages/edit.templ
    • Modified action button containers to adjust width based on screen size (w-full sm:w-auto).
    • Applied flex-1 sm:flex-initial and justify-center classes to buttons for full-width and centered text on mobile, while maintaining natural sizing on desktop.
  • internal/ui/pages/edit_templ.go
    • Updated generated HTML to reflect the new Tailwind CSS classes applied in edit.templ.
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Adds an Air live-reload config and Makefile dev target, ignores tmp/, updates Tailwind build invocation, and adjusts responsive layout and button markup/styles in capture/edit templates and generated Go template.

Changes

Cohort / File(s) Summary
Live-reload config & Tailwind build
./.air.toml
New Air config: root/tmp_dir, pre_cmd runs templ generate and Tailwind CLI to build ./static/styles.css; build cmd outputs ./tmp/main; include/exclude rules, delay/kill_delay, and log/cleanup settings.
Build tooling
./Makefile
Adds dev target to run air, updates .PHONY to include dev, and removes -include local.mk.
Ignored artifacts
./.gitignore
Adds tmp/ to ignored paths.
Edit page templates
internal/ui/pages/edit.templ, internal/ui/pages/edit_templ.go
Responsive layout changes: actions container -> flex-col sm:flex-row, left/right groups use w-full sm:w-auto; buttons standardized to flex-1 sm:flex-initial with centered alignment and explicit labels; presentational-only markup adjustments.
Capture page templates
internal/ui/pages/capture.templ, internal/ui/pages/capture_templ.go
Submit button markup changed to relative flex items-center justify-center pl-6, adds visible "Save Entry" label and moves spinner into an inner animate-spin wrapper; minor HTML span placement updates.
Tailwind CSS tweaks
tailwind/styles.css
Adjusts .htmx-indicator rules: switch from display toggling to opacity and absolute positioning for centered spinner indicator.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Air as Air (watcher)
    participant Templ as templ (generator)
    participant Tailwind as Tailwind CLI
    participant GoBuild as Go build
    participant App as ./tmp/main

    Dev->>Air: start `air` (e.g., `make dev`)
    Air->>Templ: run `templ generate` (pre_cmd)
    Air->>Tailwind: run Tailwind CLI -> write `./static/styles.css`
    Air->>GoBuild: run `go build -o ./tmp/main ./cmd/learnd`
    GoBuild->>App: produce `./tmp/main`
    Air->>App: launch/replace entrypoint `./tmp/main` (respect kill_delay)
    App-->>Dev: serve updated app
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐇 I hopped through build and tailwind's song,
templ spun pages neat and strong,
tmp/ tucks binaries out of sight,
buttons stretch and spinners light,
dev server hums — I nibble with delight.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the two main changes: mobile edit button layout improvements and the addition of Air live-reload configuration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/mobile-edit-buttons-fullwidth-and-air

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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 is a great addition, improving the developer experience with live-reloading via air and enhancing the mobile UI for the edit page by making action buttons full-width. The implementation is solid. I've added a few suggestions to further refine the new development workflow and improve the consistency of the CSS classes used for the buttons.

Comment thread .air.toml Outdated
Comment thread internal/ui/pages/edit.templ
Comment thread internal/ui/pages/edit.templ
Comment thread internal/ui/pages/edit.templ Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
.air.toml (2)

17-17: main_only = true suppresses Air's own build/reload output.

With this setting, build failures from pre_cmd (e.g., a templ syntax error) won't surface Air's error messages in the terminal, which can make diagnosing rebuild failures harder. Consider setting main_only = false (the default) or omitting the [log] section entirely.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.air.toml at line 17, The Air config currently sets main_only = true which
hides Air's build/reload logs and can suppress errors from pre_cmd; change the
log configuration by setting main_only = false (or remove the [log] section
entirely) so Air will show its own build/reload output and surface pre_cmd build
failures (look for the main_only key in the .air.toml [log] section and adjust
it accordingly).

6-6: Consider omitting --minify in pre_cmd for faster dev rebuilds.

Running tailwindcss --minify on every file-change rebuild adds unnecessary processing time in a development loop. Unminified CSS is also easier to inspect in devtools.

♻️ Proposed change
-  pre_cmd = ["templ generate", "tailwindcss -i ./tailwind/styles.css -o ./static/styles.css --minify"]
+  pre_cmd = ["templ generate", "tailwindcss -i ./tailwind/styles.css -o ./static/styles.css"]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.air.toml at line 6, Summary: The pre_cmd includes tailwindcss with the
--minify flag which slows dev rebuilds; remove or conditionally skip --minify
for development. Fix: update the pre_cmd entry that runs "tailwindcss -i
./tailwind/styles.css -o ./static/styles.css --minify" to omit the --minify flag
for local/dev runs (or run minification only in production by adding an env
check or separate prod command), i.e., adjust the pre_cmd definition so the
tailwindcss invocation used during development is "tailwindcss -i
./tailwind/styles.css -o ./static/styles.css" while preserving a separate
minified build step for production. Ensure you update the .air.toml pre_cmd
array and any related env-based logic that decides when to include --minify.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.air.toml:
- Line 8: Replace the deprecated build.bin field in the .air.toml (currently
"bin = \"./tmp/main\"") with the new build.entrypoint array format; update the
configuration to remove build.bin and add build.entrypoint containing the
executable path as a single-element array (e.g., ["./tmp/main"]) so the project
uses the supported entrypoint key.

In `@internal/ui/pages/edit.templ`:
- Around line 229-234: The Cancel anchor (<a> element with text "Cancel") is
missing the Tailwind 'flex' utility so its 'justify-center' has no effect;
update the class attribute on that element (the Cancel <a>) to include 'flex'
alongside the existing 'btn-secondary flex-1 sm:flex-initial justify-center'
(matching the other action buttons which use 'flex items-center justify-center')
so the centering utilities work as intended.

---

Nitpick comments:
In @.air.toml:
- Line 17: The Air config currently sets main_only = true which hides Air's
build/reload logs and can suppress errors from pre_cmd; change the log
configuration by setting main_only = false (or remove the [log] section
entirely) so Air will show its own build/reload output and surface pre_cmd build
failures (look for the main_only key in the .air.toml [log] section and adjust
it accordingly).
- Line 6: Summary: The pre_cmd includes tailwindcss with the --minify flag which
slows dev rebuilds; remove or conditionally skip --minify for development. Fix:
update the pre_cmd entry that runs "tailwindcss -i ./tailwind/styles.css -o
./static/styles.css --minify" to omit the --minify flag for local/dev runs (or
run minification only in production by adding an env check or separate prod
command), i.e., adjust the pre_cmd definition so the tailwindcss invocation used
during development is "tailwindcss -i ./tailwind/styles.css -o
./static/styles.css" while preserving a separate minified build step for
production. Ensure you update the .air.toml pre_cmd array and any related
env-based logic that decides when to include --minify.

Comment thread .air.toml Outdated
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.air.toml:
- Line 6: Update the pre_cmd entry that runs Tailwind so it invokes the package
via npx instead of assuming a global binary: replace the direct "tailwindcss -i
./tailwind/styles.css -o ./static/styles.css" call referenced in the pre_cmd
array with an npx invocation ("npx tailwindcss ..."); keep the development flags
as-is (no --minify) to match dev behavior but note in comments or docs that
production builds use the --minify flag (as in the Makefile's tail-prod) to
ensure parity when switching to production.

In `@internal/ui/pages/edit.templ`:
- Around line 229-234: The Cancel anchor in the template (the <a href="/"
class="btn-secondary flex justify-center"> element) is missing the items-center
utility; update its class to match the other action buttons (e.g., use
"btn-secondary flex items-center justify-center") so vertical alignment matches
the "Re-fetch", "Re-summarize", and "Save Changes" buttons.

---

Duplicate comments:
In @.air.toml:
- Line 8: The comment confirms that build.entrypoint correctly replaces the
deprecated build.bin and is properly formatted as an array (first element
executable, subsequent elements default args); no code changes required—leave
the build.entrypoint setting as-is in the configuration (reference:
build.entrypoint).

Comment thread .air.toml Outdated
Comment thread internal/ui/pages/edit.templ
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
internal/ui/pages/edit.templ (1)

235-240: Consider absolute-positioning the spinner to keep button text visually centered when idle.

The htmx-indicator span is opacity: 0 (but still occupies space) when no request is in flight, shifting "Save Changes" slightly right of center on the wider mobile button. An optional fix is to take the spinner out of the normal flow:

✨ Optional: absolute-positioned spinner
-<button type="submit" class="btn-primary flex-1 sm:flex-initial flex items-center justify-center gap-2">
-    <span class="htmx-indicator animate-spin">
-        `@components.SpinnerIcon`()
-    </span>
-    <span>Save Changes</span>
+<button type="submit" class="btn-primary flex-1 sm:flex-initial relative flex items-center justify-center">
+    <span class="htmx-indicator animate-spin absolute left-3">
+        `@components.SpinnerIcon`()
+    </span>
+    <span>Save Changes</span>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/ui/pages/edit.templ` around lines 235 - 240, The spinner span
(.htmx-indicator / `@components.SpinnerIcon`) is occupying layout space when
hidden, nudging the "Save Changes" text off-center; change the button to
position: relative and make the .htmx-indicator span absolutely positioned
(e.g., position: absolute; left: <x>; top: 50%; transform: translateY(-50%)) so
it is taken out of normal flow, and add equivalent left padding to the button
content to preserve space for the spinner when it becomes visible; update the
template (the button element and the .htmx-indicator span) and the corresponding
CSS to implement these class changes and ensure htmx's show/hide still toggles
opacity/visibility correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@internal/ui/pages/edit.templ`:
- Around line 228-234: The Cancel button alignment issue has been resolved by
adding the CSS utility "items-center" to the anchor element rendering the Cancel
button (the <a> with class "btn-secondary ..."); no further change is
needed—ensure the anchor in the template retains "items-center" alongside "flex
items-center justify-center" so it matches the other action buttons' vertical
alignment.

---

Nitpick comments:
In `@internal/ui/pages/edit.templ`:
- Around line 235-240: The spinner span (.htmx-indicator /
`@components.SpinnerIcon`) is occupying layout space when hidden, nudging the
"Save Changes" text off-center; change the button to position: relative and make
the .htmx-indicator span absolutely positioned (e.g., position: absolute; left:
<x>; top: 50%; transform: translateY(-50%)) so it is taken out of normal flow,
and add equivalent left padding to the button content to preserve space for the
spinner when it becomes visible; update the template (the button element and the
.htmx-indicator span) and the corresponding CSS to implement these class changes
and ensure htmx's show/hide still toggles opacity/visibility correctly.

The htmx-indicator spinner was occupying layout space inside the flex
button, nudging the button text off-center when visible. Changed the
spinner to absolute positioning (opacity-based toggle) and added left
padding to the button to reserve space for the spinner overlay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/ui/pages/capture.templ`:
- Around line 110-112: The spinner's positioning class htmx-indicator and the
rotation class animate-spin conflict because both modify transform; update the
markup so the positioned wrapper and the rotating element are separate: keep the
outer <span> with htmx-indicator for positioning and place a nested <span
class="animate-spin"> around the `@components.SpinnerIcon`() (or apply
animate-spin inside SpinnerIcon if preferred) so translation (htmx-indicator) is
preserved while rotation is applied only to the inner element.

In `@internal/ui/pages/edit.templ`:
- Around line 236-238: The spinner currently applies both positioning and
rotation on the same element (span with classes htmx-indicator and
animate-spin), which lets the spin animation override the translateY centering;
fix by separating concerns: keep the outer span that contains the htmx-indicator
class (used for vertical centering/positioning) and move the animate-spin class
to an inner wrapper around `@components.SpinnerIcon`() so rotation is applied only
to the inner element while the outer span maintains its translateY(-50%)
positioning.

In `@tailwind/styles.css`:
- Around line 268-274: The spinner is wobbling because .htmx-indicator sets
transform: translateY(-50%) which conflicts with the `@keyframes` spin (which
animates transform: rotate), so either ensure the keyframes preserve the
translateY or separate positioning and rotation onto different elements: Option
1 — update `@keyframes` spin (and any animate-spin reference) to include the same
translateY(-50%) in both from and to (e.g., from { transform: translateY(-50%)
rotate(0deg) } to { transform: translateY(-50%) rotate(360deg) }) so rotation
doesn’t interpolate away the translate, or Option 2 — move the translateY
positioning off .htmx-indicator into a wrapper element (wrap the icon in a child
<span>), keep translateY on the parent and apply animate-spin/rotation to the
inner span so positioning and rotation are on separate elements; locate
.htmx-indicator, `@keyframes` spin, and the template/icon markup to apply the
chosen fix.

Comment thread internal/ui/pages/capture.templ Outdated
Comment thread internal/ui/pages/edit.templ Outdated
Comment thread tailwind/styles.css
Move animate-spin from the .htmx-indicator span to an inner wrapper so
that the translateY(-50%) centering on the outer element is not overridden
by the spin keyframes' transform: rotate().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@drywaters drywaters merged commit feb78f2 into main Feb 20, 2026
1 check passed
@drywaters drywaters deleted the feat/mobile-edit-buttons-fullwidth-and-air branch February 20, 2026 22:46
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