Skip to content

FIX: client portal crashing on beta app when validate count function takes more than 15 seconds. #1115

Merged
arpandhakal merged 39 commits intomainfrom
chore/max-duration-on-client-page
Apr 16, 2026
Merged

FIX: client portal crashing on beta app when validate count function takes more than 15 seconds. #1115
arpandhakal merged 39 commits intomainfrom
chore/max-duration-on-client-page

Conversation

@arpandhakal
Copy link
Copy Markdown
Collaborator

Changes

  • increased the max duration of client page just in case where validate-notificaiton job takes more than 15 seconds

@arpandhakal arpandhakal requested a review from rrojan January 29, 2026 12:09
@arpandhakal arpandhakal self-assigned this Jan 29, 2026
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview, Comment Apr 16, 2026 6:40am

Request Review

SandipBajracharya and others added 23 commits March 25, 2026 11:19
…title (#1153)

* feat(OUT-3439): support dynamic fields and its conversion on task template title
Add a "Dynamic Fields" section to the right sidebar of the template detail page.
Clicking a field chip inserts the token at the last cursor position in the title.
Uses a context provider to connect TemplateDetails insert handler with TemplateSidebar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mplate views

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n sidebar card click

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    Replace contentEditable-based TokenizedInput with a minimal TipTap editor
    for template title fields, using Tapwrite's AutofillExtension for dynamic
    field tokens.

    Changes:
    - [x] Add TipTap dependencies (@tiptap/react, core, pm, extensions)
    - [x] Create TitleEditor component with minimal TipTap setup
      - Single-line (Enter blocked, single paragraph Document)
      - Extensions: Document, Paragraph, Text, History, Placeholder, AutofillExtension
      - No formatting, no slash commands, no lists
      - {{ trigger opens dynamic field dropdown (reuses TapwriteDynamicFieldDropdown)
      - Enter selects dropdown option when open, blocked otherwise
    - [x] Replace TokenizedInput in TemplateForm (create modal)
    - [x] Replace TokenizedInput in TemplateDetails (detail page)
    - [x] Remove unused refs, cursor tracking, sidebar insert logic from TemplateDetails
    - [x] Plain text conversion: editorToPlainText extracts {{tokens}} from TipTap JSON
    - [x] Font size override via !important to beat Tapwrite's .tiptap p CSS

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- [x] create dedicated hook for handling the editor logic (extensions, conversion utils, sync, key handling)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… description

- Expose TipTap editor instance via onEditorReady callback on TitleEditor
- Move onEditorReady useEffect into useTitleEditor hook
- Complete handleSidebarFieldInsert in TemplateDetails:
  1. Title focused → insert via TipTap editor commands
  2. Description focused → insert at DOM cursor via insertAutofillAtCursor
  3. Nothing focused → append to end of description HTML
- Re-register handler with DynamicFieldInsertProvider context

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lateId from public API

- [x] resolve dynamic tokens using existing `resolveDynamicFields` and `resolveAutofillTags` when deserializing payload
…e sidebar

Add drag-and-drop support for sidebar dynamic field cards into both
title and description editors, while preserving existing click-to-insert
behavior. Drop handling is done manually to avoid ProseMirror's default
NodeSelection highlight, placing the cursor beside the inserted node.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
arpandhakal and others added 15 commits March 27, 2026 14:19
…splay

- Replace plain text input with TitleEditor in NewTemplateCard so sub-template
  titles support dynamic field tokens ({{Current Month}}, etc.)
- Resolve dynamic field tokens in subtask titles and body when tasks are created
  from templates via the internal and public API (tasksShared.service.ts)
- Add DynamicFieldTitle component to render {{token}} patterns as styled inline
  chips in the sub-templates list on the template detail page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…c fields

- Add `getWorstCaseResolvedLength()` to dynamicFields.ts — replaces each
  {{token}} with its maximum possible resolved value (e.g. {{Current Week}}
  → "Week of September 30, 2026" = 26 chars) to compute the longest task
  title that could be generated from a template
- Add `createMaxLengthExtension()` — a ProseMirror plugin via TipTap's
  `addProseMirrorPlugins()` that runs `filterTransaction` to silently block
  any change that would violate either limit:
    1. Raw stored length > 255 (template VARCHAR(255) column)
    2. Worst-case resolved length > 255 (task VARCHAR(255) column)
- Wire `maxLength` prop through TitleEditor → useTitleEditor, defaulting
  to 255 so all template title editors are protected automatically

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
maxLength is always 255 (the DB VARCHAR limit), so remove it as a
configurable prop from TitleEditor and useTitleEditor and move the
constant into useTitleEditor where the enforcement lives.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…emplate title

The autofill chip renders inside an inline-flex node view. Its border (1px top
+ 1px bottom) causes the flex item's box to exceed the paragraph line-height,
expanding the line box by 2px on every chip insertion.

Replace the chip's border with an outline scoped to the title editor context.
Outline is cosmetically identical (same color, follows border-radius in modern
browsers) but has no effect on layout, eliminating the shift without changing
the chip's size or padding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a filter (e.g. "My Tasks") is active, subtasks that match the filter
are now shown as standalone items if their parent task doesn't pass the
filter. Also adds accessibleTasks to the useEffect dependency array so
realtime subtask changes trigger re-filtering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tate and showArchived showUnarchived filter state, some general cleanups
Pass endOption and endOptionHref props to ListWithEndOption in noOptionsText
so the "Manage templates" navigation button renders when the template list is empty.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
OUT-2668, OUT-3181 | Show subtasks IU is assigned to in "My Tasks"
OUT-3200 | Improve experience when no templates exist while creating a task
…alidate-notificaiton job takes more than 15 seconds
@arpandhakal arpandhakal force-pushed the chore/max-duration-on-client-page branch from 60aec67 to d1bc805 Compare March 31, 2026 09:05
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 31, 2026

Deployment failed with the following error:

Deploying Serverless Functions to multiple regions is restricted to the Pro and Enterprise plans.

Learn More: https://vercel.link/multiple-function-regions

@arpandhakal arpandhakal changed the base branch from main to feature/template-dynamic-fields March 31, 2026 09:05
Comment thread src/app/client/page.tsx
import { Suspense } from 'react'
import { z } from 'zod'

export const maxDuration = 60 //just to be safe. the validate count job might take longer that 15 seconds(default max duration of server components) which will make the app crash. Increasing the duration to 60.
Copy link
Copy Markdown
Collaborator

@SandipBajracharya SandipBajracharya Apr 1, 2026

Choose a reason for hiding this comment

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

Are we sure this gets resolved in a min? Otherwise we can actually update it to more than a minute if needed.

Copy link
Copy Markdown
Collaborator

@SandipBajracharya SandipBajracharya left a comment

Choose a reason for hiding this comment

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

lgtm

@arpandhakal arpandhakal force-pushed the feature/template-dynamic-fields branch from 1b506dd to d82d708 Compare April 16, 2026 04:59
@arpandhakal arpandhakal changed the base branch from feature/template-dynamic-fields to main April 16, 2026 06:38
@arpandhakal arpandhakal dismissed SandipBajracharya’s stale review April 16, 2026 06:38

The base branch was changed.

@arpandhakal arpandhakal merged commit c2acfc7 into main Apr 16, 2026
3 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.

3 participants