Commit Graph

51 Commits

Author SHA1 Message Date
Keyan 5f0494de30
rethinking boost (#1408)
* reuse boost for jobs

* wip

* allow job stopping

* restore upvote.js

* expire boost

* boost beyond edit window

* fix boost bolt styling

* rank comments with boost

* no random sort for jobs

* top boost for month at top of territory

* boost hints

* more boost help

* squash migrations

* for same boost, prioritize older

* show ad only if active

* fix itemCreate/Update boost expiration jobs

* fix fee button precedence
2024-09-19 13:13:14 -05:00
ekzyis 8a4e67e9f0
Anon edits (#1393)
* Rename vars around edit permission

* Allow anon edits with hash+hmac

* Fix missing time zone for invoice.confirmedAt of comments

* Fix missing invoice update on item update

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-09-13 10:11:19 -05:00
keyan 07042c57ca improve UX of notifications 2024-07-11 16:59:07 -05:00
Keyan ca11ac9fb8
backend payment optimism (#1195)
* wip backend optimism

* another inch

* make action state transitions only happen once

* another inch

* almost ready for testing

* use interactive txs

* another inch

* ready for basic testing

* lint fix

* inches

* wip item update

* get item update to work

* donate and downzap

* inchy inch

* fix territory paid actions

* wip usePaidMutation

* usePaidMutation error handling

* PENDING_HELD and HELD transitions, gql paidAction return types

* mostly working pessimism

* make sure invoice field is present in optimisticResponse

* inches

* show optimistic values to current me

* first pass at notifications and payment status reporting

* fix migration to have withdrawal hash

* reverse optimism on payment failure

* Revert "Optimistic updates via pending sats in item context (#1229)"

This reverts commit 93713b33df.

* add onCompleted to usePaidMutation

* onPaid and onPayError for new comments

* use 'IS DISTINCT FROM' for NULL invoiceActionState columns

* make usePaidMutation easier to read

* enhance invoice qr

* prevent actions on unpaid items

* allow navigation to action's invoice

* retry create item

* start edit window after item is paid for

* fix ux of retries from notifications

* refine retries

* fix optimistic downzaps

* remember item updates can't be retried

* store reference to action item in invoice

* remove invoice modal layout shift

* fix destructuring

* fix zap undos

* make sure ItemAct is paid in aggregate queries

* dont toast on long press zap undo

* fix delete and remindme bots

* optimistic poll votes with retries

* fix retry notifications and invoice item context

* fix pessimisitic typo

* item mentions and mention notifications

* dont show payment retry on item popover

* make bios work

* refactor paidAction transitions

* remove stray console.log

* restore docker compose nwc settings

* add new todos

* persist qr modal on post submission + unify item form submission

* fix post edit threshold

* make bounty payments work

* make job posting work

* remove more store procedure usage ... document serialization concerns

* dont use dynamic imports for paid action modules

* inline comment denormalization

* create item starts with median votes

* fix potential of serialization anomalies in zaps

* dont trigger notification indicator on successful paid action invoices

* ignore invoiceId on territory actions and add optimistic concurrency control

* begin docs for paid actions

* better error toasts and fix apollo cache warnings

* small documentation enhancements

* improve paid action docs

* optimistic concurrency control for territory updates

* use satsToMsats and msatsToSats helpers

* explictly type raw query template parameters

* improve consistency of nested relation names

* complete paid action docs

* useEffect for canEdit on payment

* make sure invoiceId is provided when required

* don't return null when expecting array

* remove buy credits

* move verifyPayment to paidAction

* fix comments invoicePaidAt time zone

* close nwc connections once

* grouped logs for paid actions

* stop invoiceWaitUntilPaid if not attempting to pay

* allow actionState to transition directly from HELD to PAID

* make paid mutation wait until pessimistic are fully paid

* change button text when form submits/pays

* pulsing form submit button

* ignore me in notification indicator for territory subscription

* filter unpaid items from more queries

* fix donation stike timing

* fix pending poll vote

* fix recent item notifcation padding

* no default form submitting button text

* don't show paying on submit button on free edits

* fix territory autorenew with fee credits

* reorg readme

* allow jobs to be editted forever

* fix image uploads

* more filter fixes for aggregate views

* finalize paid action invoice expirations

* remove unnecessary async

* keep clientside cache normal/consistent

* add more detail to paid action doc

* improve paid action table

* remove actionType guard

* fix top territories

* typo api/paidAction/README.md

Co-authored-by: ekzyis <ek@stacker.news>

* typo components/use-paid-mutation.js

Co-authored-by: ekzyis <ek@stacker.news>

* Apply suggestions from code review

Co-authored-by: ekzyis <ek@stacker.news>

* encorporate ek feeback

* more ek suggestions

* fix 'cost to post' hover on items

* Apply suggestions from code review

Co-authored-by: ekzyis <ek@stacker.news>

---------

Co-authored-by: ekzyis <ek@stacker.news>
2024-07-01 12:02:29 -05:00
keyan f2ba61e64b enhance navigation 2024-03-26 18:36:31 -05:00
ekzyis d237861ff5
Use module path aliases (#938)
* Use module path aliases

* fix broken refactor

* path mapping for svgs, style, and remaining places (bonus: lose babel dep)

---------

Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-03-19 19:37:31 -05:00
keyan 10203f565c territories 2023-12-04 21:34:06 -06:00
keyan c23e49872a make fee button less of a hack 2023-11-10 18:18:10 -06:00
keyan 7bbcc86270 redirect to login on pages that require auth (#269) 2023-08-28 12:52:15 -05:00
keyan 8d8e2859dd fix dark mode 2023-08-04 19:21:51 -05:00
keyan 8ab018af88 fix nested comment sorting 2023-07-25 19:45:35 -05:00
keyan 6407455def upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
keyan 59f7b6ff26 Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades""
This reverts commit 18910fa2ed.
2023-07-23 10:08:43 -05:00
keyan 18910fa2ed Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"
This reverts commit d0314ab73c.
2023-07-23 09:16:12 -05:00
keyan d0314ab73c shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades 2023-07-21 17:33:11 -05:00
keyan df1f1a483a require sub selection, allow editting 2023-05-10 19:30:51 -05:00
keyan 01d29e013e fix job editting bug 2023-05-08 14:14:32 -05:00
keyan b406f0c340 avoid db dip for sub 2023-05-05 12:39:57 -05:00
Austin Kelsay e13e37744e
stackernews bounties (#227)
bounties
2023-01-26 10:11:55 -06:00
keyan 29c59d93ea open timestamps 2023-01-22 14:17:50 -06:00
keyan 760b6b6e10 related items 2022-10-27 15:25:42 -05:00
keyan 46ea2f661c make jobs great again 2022-09-29 15:42:33 -05:00
keyan 388c7d0240 full powered editing 2022-08-18 13:15:24 -05:00
keyan d91eb02c74 don't 404 for inactive job that user owns 2022-04-21 13:06:52 -05:00
keyan ae916ecb97 add notFound function to SSR HOF, 404 inactive jobs 2022-04-18 11:40:08 -05:00
keyan b954186d31 jobs w/o payments yet 2022-02-24 13:05:57 -06:00
keyan 945225d205 return 404 for nonexistant users and items 2021-10-26 16:31:39 -05:00
keyan 07b9da353b smarter use of SSR and caching 2021-10-26 15:49:37 -05:00
keyan a226bac25d fix apollo ssr client imports 2021-09-30 11:05:23 -05:00
keyan ca1a95094c ssr everything 2021-09-30 10:46:58 -05:00
keyan e7787e3e67 WIP bios 2021-09-23 12:42:00 -05:00
keyan 91a2061342 cache magic - use cache and network except when a result of popstate 2021-09-06 17:36:08 -05:00
keyan 0133c7acc6 open item links in new tab, nofollow links conditionally 2021-09-02 13:11:27 -05:00
keyan 1d6e301b10 fix crashes and report which object failed in walletd 2021-08-12 16:21:56 -05:00
keyan a48cd33db3 edit posts - links and discussions 2021-08-11 15:13:10 -05:00
keyan 273cf144b4 ssr item for metatags 2021-07-08 12:27:52 -05:00
keyan 11f3654f1e don't do seo until we load items 2021-07-07 19:34:23 -05:00
keyan 68e80b615c working previews 2021-07-07 19:15:27 -05:00
keyan 9f6b669e42 fix stacked and spacing on discussion text 2021-06-11 17:38:21 -05:00
keyan d4d1169058 small ui stuff 2021-05-05 13:13:14 -05:00
keyan 2da1ee1a4b fix skeletons 2021-04-28 17:52:03 -05:00
keyan 6ea9ff7e11 a number of style updates 2021-04-28 14:30:14 -05:00
keyan 84b69fc481 ranking mostly 2021-04-27 16:30:58 -05:00
keyan c82c82bb7b mostly clientside render 2021-04-26 19:55:48 -05:00
keyan c626998952 attempts at voting before running into cache issues 2021-04-26 16:55:15 -05:00
keyan ec3f6b922d a bunch of new stuff 2021-04-22 17:14:32 -05:00
keyan 2e3824f1dc most stuff works 2021-04-18 13:50:04 -05:00
keyan 6792d1d5ff working comments with cache updates 2021-04-17 13:15:18 -05:00
keyan 95d6d789fa pre recursive comments 2021-04-15 14:41:02 -05:00
keyan 28ed42fc29 more progress 2021-04-14 18:56:29 -05:00